• 大小: 40KB
    文件类型: .rar
    金币: 1
    下载: 0 次
    发布日期: 2021-06-03
  • 语言: C#
  • 标签: VS2010  文字  图片  

资源简介

Microsoft Visual Studio 2010做的C#把文字做成图片实例,主要代码: Bitmap bitmapOut = new Bitmap(600, 600); Graphics graOut = Graphics.FromImage(bitmapOut); //创建画笔 graOut.FillRectangle(Brushes.White, new Rectangle(0, 0, 600, 600)); //把b1涂成白色 Font fontText = new Font("宋体", 8); SolidBrush sbhText = new SolidBrush(Color.Black); graOut.DrawString(sText, fontText, sbhText, new PointF(10, 10)); bitmapOut.Save("D:\\temp\\temp0907.bmp"); graOut.Dispose(); bitmapOut.Dispose();

资源截图

代码片段和文件信息

using System;
using System.Collections.Generic;
using System.Linq;
using System.Windows.Forms;

namespace Demo_createTextImage
{
    static class Program
    {
        /// 
        /// 应用程序的主入口点。
        /// 

        [STAThread]
        static void Main()
        {
            Application.EnableVisualstyles();
            Application.SetCompatibleTextRenderingDefault(false);
            Application.Run(new w_main());
        }
    }
}

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

     文件       9216  2017-09-16 09:13  Demo_createTextImage\Demo_createTextImage\bin\Debug\Demo_createTextImage.exe

     文件      26112  2017-09-16 09:13  Demo_createTextImage\Demo_createTextImage\bin\Debug\Demo_createTextImage.pdb

     文件      11600  2017-09-16 09:15  Demo_createTextImage\Demo_createTextImage\bin\Debug\Demo_createTextImage.vshost.exe

     文件        490  2010-03-17 22:39  Demo_createTextImage\Demo_createTextImage\bin\Debug\Demo_createTextImage.vshost.exe.manifest

     文件       3704  2017-09-16 09:07  Demo_createTextImage\Demo_createTextImage\Demo_createTextImage.csproj

     文件       1172  2017-09-16 09:15  Demo_createTextImage\Demo_createTextImage\obj\x86\Debug\Demo_createTextImage.csproj.FileListAbsolute.txt

     文件       9216  2017-09-16 09:13  Demo_createTextImage\Demo_createTextImage\obj\x86\Debug\Demo_createTextImage.exe

     文件      26112  2017-09-16 09:13  Demo_createTextImage\Demo_createTextImage\obj\x86\Debug\Demo_createTextImage.pdb

     文件        180  2017-09-16 09:07  Demo_createTextImage\Demo_createTextImage\obj\x86\Debug\Demo_createTextImage.Properties.Resources.resources

     文件        180  2017-09-16 09:07  Demo_createTextImage\Demo_createTextImage\obj\x86\Debug\Demo_createTextImage.w_main.resources

     文件       4501  2017-09-16 09:15  Demo_createTextImage\Demo_createTextImage\obj\x86\Debug\DesignTimeResolveAssemblyReferences.cache

     文件       6432  2017-09-16 09:13  Demo_createTextImage\Demo_createTextImage\obj\x86\Debug\DesignTimeResolveAssemblyReferencesInput.cache

     文件        426  2017-09-16 09:07  Demo_createTextImage\Demo_createTextImage\obj\x86\Debug\GenerateResource.read.1.tlog

     文件       1002  2017-09-16 09:07  Demo_createTextImage\Demo_createTextImage\obj\x86\Debug\GenerateResource.write.1.tlog

     文件        502  2017-09-16 08:50  Demo_createTextImage\Demo_createTextImage\Program.cs

     文件       1390  2017-09-16 08:50  Demo_createTextImage\Demo_createTextImage\Properties\AssemblyInfo.cs

     文件       2891  2017-09-16 08:50  Demo_createTextImage\Demo_createTextImage\Properties\Resources.Designer.cs

     文件       5612  2017-09-16 08:50  Demo_createTextImage\Demo_createTextImage\Properties\Resources.resx

     文件       1106  2017-09-16 08:50  Demo_createTextImage\Demo_createTextImage\Properties\Settings.Designer.cs

     文件        249  2017-09-16 08:50  Demo_createTextImage\Demo_createTextImage\Properties\Settings.settings

     文件       2204  2017-09-16 09:13  Demo_createTextImage\Demo_createTextImage\w_main.cs

     文件       3124  2017-09-16 08:55  Demo_createTextImage\Demo_createTextImage\w_main.Designer.cs

     文件       5817  2017-09-16 08:55  Demo_createTextImage\Demo_createTextImage\w_main.resx

     文件        902  2017-09-16 08:50  Demo_createTextImage\Demo_createTextImage.sln

    ..A..H.     20480  2017-09-16 09:16  Demo_createTextImage\Demo_createTextImage.suo

     目录          0  2017-09-16 08:50  Demo_createTextImage\Demo_createTextImage\obj\x86\Debug\TempPE

     目录          0  2017-09-16 09:15  Demo_createTextImage\Demo_createTextImage\obj\x86\Debug

     目录          0  2017-09-16 09:15  Demo_createTextImage\Demo_createTextImage\bin\Debug

     目录          0  2017-09-16 08:50  Demo_createTextImage\Demo_createTextImage\bin\Release

     目录          0  2017-09-16 08:50  Demo_createTextImage\Demo_createTextImage\obj\x86

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

评论

共有 条评论