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("
在System.Speech命名空间下,SpeechSynthesizer类可以把文字读出来,一起来玩下~~
首先在Windows窗体项目中引入System.Speech。界面部分:
后台代码也很简单,只不过调用了SpeechSynthesizer类的一些方法:
using System.Windows.Forms;
using System.Speech;
using System.Speech.Synthesis;
namespace WindowsFormsAp