画带阴影效果文字

画带阴影效果文字

ID:20458366

大小:26.50 KB

页数:4页

时间:2018-10-10

画带阴影效果文字_第1页
画带阴影效果文字_第2页
画带阴影效果文字_第3页
画带阴影效果文字_第4页
资源描述:

《画带阴影效果文字》由会员上传分享,免费在线阅读,更多相关内容在行业资料-天天文库

1、usingSystem;usingSystem.Drawing;usingSystem.Drawing.Text;usingSystem.Drawing.Drawing2D;usingSystem.Collections;usingSystem.ComponentModel;usingSystem.Windows.Forms;usingSystem.Data;namespaceWindowsApplication1{///

///Form1.的摘要说明。///publicclass

2、Form1:System.Windows.Forms.Form{///

///必需的设计器变量。///privateSystem.ComponentModel.Containercomponents=null;privatestringTextToDraw="【孟宪会之精彩世界】";publicForm1(){////Windows窗体设计器支持所必需的//InitializeComponent();//在InitializeComponent调用后添加任何构造函数代码this.S

3、etStyle(ControlStyles.ResizeRedraw,true);}///

///清理所有正在使用的资源。///protectedoverridevoidDispose(booldisposing){if(disposing){if(components!=null){components.Dispose();}}base.Dispose(disposing);}#regionWindowsFormDesignergeneratedcode////

4、//设计器支持所需的方法-不要使用代码编辑器修改///此方法的内容。///

privatevoidInitializeComponent(){////Form1//this.AutoScaleBaseSize=newSystem.Drawing.Size(16,36);this.BackColor=System.Drawing.Color.White;this.ClientSize=newSystem.Drawing.Size(376,293);this.Font=newSystem.Drawing

5、.Font("Tahoma",21.75F,System.Drawing.FontStyle.Bold,System.Drawing.GraphicsUnit.Point,((System.Byte)(0)));this.Name="Form1";this.Text="Form1";this.Paint+=newSystem.Windows.Forms.PaintEventHandler(this.Form1_Paint);}#endregion///

///应用程序入口点///[

6、STAThread]staticvoidMain(){Application.Run(newForm1());}protectedoverridevoidOnPaintBackground(PaintEventArgse){LinearGradientBrushb=newLinearGradientBrush(this.ClientRectangle,Color.Blue,Color.AliceBlue,90f);e.Graphics.FillRectangle(b,this.ClientRectangle);b.D

7、ispose();}privatevoidForm1_Paint(objectsender,System.Windows.Forms.PaintEventArgse){//创建一个小的BitmapBitmapbm=newBitmap(this.ClientSize.Width/4,this.ClientSize.Height/4);//得到Graphics对象Graphicsg=Graphics.FromImage(bm);//必须使用antialiasedrenderinghintg.TextRenderingHi

8、nt=TextRenderingHint.AntiAlias;//thismatrixzoomsthetextoutto1/4sizeandoffsetsitbyalittlerightanddownMatrixmx=newMatrix(0.25f,0,0,0.25f,3,3);g.Transform=mx;//画阴影g.DrawString(

当前文档最多预览五页,下载文档查看全文

此文档下载收益归作者所有

当前文档最多预览五页,下载文档查看全文
温馨提示:
1. 部分包含数学公式或PPT动画的文件,查看预览时可能会显示错乱或异常,文件下载后无此问题,请放心下载。
2. 本文档由用户上传,版权归属用户,天天文库负责整理代发布。如果您对本文档版权有争议请及时联系客服。
3. 下载前请仔细阅读文档内容,确认文档内容符合您的需求后进行下载,若出现内容与标题不符可向本站投诉处理。
4. 下载文档时可能由于网络波动等原因无法下载或下载错误,付费完成后未能成功下载的用户请联系客服处理。