• 大小: 0.05M
    文件类型: .rar
    金币: 1
    下载: 0 次
    发布日期: 2020-12-14
  • 语言: C#
  • 标签: 图片  文字  转换  

资源简介

C# 文字转换为图片 示例源码

资源截图

代码片段和文件信息

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Drawing.Imaging;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace TextTopic
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void btntopic_Click(object sender EventArgs e)
        {
            //获取文本
            string text = this.txtword.Text;

            if (string.IsNullOrEmpty(text))
            {
                MessageBox.Show(“文本不能为空“);
                return;
            }
            //得到Bitmap(传入Rectangle.Empty自动计算宽高)
            Bitmap bmp = TextToBitmap(text this.txtw

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     文件        187  2017-11-10 11:15  TextTopic\TextTopic\App.config

     文件      11264  2017-11-10 11:53  TextTopic\TextTopic\bin\Debug\TextTopic.exe

     文件        187  2017-11-10 11:15  TextTopic\TextTopic\bin\Debug\TextTopic.exe.config

     文件      26112  2017-11-10 11:53  TextTopic\TextTopic\bin\Debug\TextTopic.pdb

     文件      24224  2017-11-12 09:26  TextTopic\TextTopic\bin\Debug\TextTopic.vshost.exe

     文件        187  2017-11-10 11:15  TextTopic\TextTopic\bin\Debug\TextTopic.vshost.exe.config

     文件        490  2016-07-16 19:44  TextTopic\TextTopic\bin\Debug\TextTopic.vshost.exe.manifest

     文件       3346  2017-11-10 11:53  TextTopic\TextTopic\Form1.cs

     文件       4601  2017-11-10 11:53  TextTopic\TextTopic\Form1.Designer.cs

     文件       5817  2017-11-10 11:53  TextTopic\TextTopic\Form1.resx

     文件       1453  2017-11-12 09:26  TextTopic\TextTopic\obj\Debug\DesignTimeResolveAssemblyReferences.cache

     文件       6987  2017-11-10 11:15  TextTopic\TextTopic\obj\Debug\DesignTimeResolveAssemblyReferencesInput.cache

     文件          0  2017-11-10 11:15  TextTopic\TextTopic\obj\Debug\TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs

     文件          0  2017-11-10 11:15  TextTopic\TextTopic\obj\Debug\TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs

     文件          0  2017-11-10 11:15  TextTopic\TextTopic\obj\Debug\TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs

     文件        744  2017-11-12 09:26  TextTopic\TextTopic\obj\Debug\TextTopic.csproj.FileListAbsolute.txt

     文件        977  2017-11-10 11:53  TextTopic\TextTopic\obj\Debug\TextTopic.csproj.GenerateResource.Cache

     文件       2211  2017-11-10 11:23  TextTopic\TextTopic\obj\Debug\TextTopic.csprojResolveAssemblyReference.cache

     文件      11264  2017-11-10 11:53  TextTopic\TextTopic\obj\Debug\TextTopic.exe

     文件        180  2017-11-10 11:53  TextTopic\TextTopic\obj\Debug\TextTopic.Form1.resources

     文件      26112  2017-11-10 11:53  TextTopic\TextTopic\obj\Debug\TextTopic.pdb

     文件        180  2017-11-10 11:23  TextTopic\TextTopic\obj\Debug\TextTopic.Properties.Resources.resources

     文件        521  2017-11-10 11:15  TextTopic\TextTopic\Program.cs

     文件       1342  2017-11-10 11:15  TextTopic\TextTopic\Properties\AssemblyInfo.cs

     文件       2870  2017-11-10 11:15  TextTopic\TextTopic\Properties\Resources.Designer.cs

     文件       5612  2017-11-10 11:15  TextTopic\TextTopic\Properties\Resources.resx

     文件       1096  2017-11-10 11:15  TextTopic\TextTopic\Properties\Settings.Designer.cs

     文件        249  2017-11-10 11:15  TextTopic\TextTopic\Properties\Settings.settings

     文件       3798  2017-11-10 11:23  TextTopic\TextTopic\TextTopic.csproj

     文件        996  2017-11-10 11:15  TextTopic\TextTopic.sln

............此处省略13个文件信息

评论

共有 条评论