ICANN认证国际域名顶级注册机构
网站建设,域名注册,空间租用,软件销售,广告设计 域名注册,空间租用, 网站建设,东莞网页设计,域名注册,网站推广,网站开发,网页设计 网站推广,,百度推广,新浪推广,雅虎推广,网易推广 标志设计,画册设计,包装设计,VI策划,企业形象顾问 连邦软件加盟店,提供销遥行,管家婆,速达,用友ERP,诺顿等软件报价及销售 建站必读 腾达网络,上网帮助中心, 腾达为东莞等地,提供网站建设,网站推广,广告设计,软件销售等优质服务!
建站必读


 
 
当前位置:首页 -> 建站必读 -> .NET技术
画带阴影效果的文字
using System;

using System.Drawing;

using System.Drawing.Text;

using System.Drawing.Drawing2D;

using System.Collections;

using System.ComponentModel;

using System.Windows.Forms;

using System.Data;



namespace WindowsApplication1

{

/// <summary>

/// Form1.的摘要说明。

/// </summary>

public class Form1 : System.Windows.Forms.Form

{

/// <summary>

/// 必需的设计器变量。

/// </summary>



private System.ComponentModel.Container components = null;

private string TextToDraw = "【孟宪会之精彩世界】";



public Form1()

{

//

// Windows 窗体设计器支持所必需的

//



InitializeComponent();



// 在 InitializeComponent 调用后添加任何构造函数代码



this.SetStyle(ControlStyles.ResizeRedraw,true);



}





/// <summary>

/// 清理所有正在使用的资源。

/// </summary>



protected override void Dispose( bool disposing )

{

if( disposing )

{

if (components != null)

{

components.Dispose();

}

}

base.Dispose( disposing );

}





#region Windows Form Designer generated code

/// <summary>

/// 设计器支持所需的方法 - 不要使用代码编辑器修改

/// 此方法的内容。

/// </summary>

private void InitializeComponent()

{

//

// Form1

//

this.AutoScaleBaseSize = new System.Drawing.Size(16, 36);

this.BackColor = System.Drawing.Color.White;

this.ClientSize = new System.Drawing.Size(376, 293);

this.Font = new System.Drawing.Font("Tahoma", 21.75F,

System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));

this.Name = "Form1";

this.Text = "Form1";

this.Paint += new System.Windows.Forms.PaintEventHandler(this.Form1_Paint);



}



#endregion





/// <summary>

/// 应用程序入口点

/// </summary>



[STAThread]

static void Main()

{

Application.Run(new Form1());

}



protected override void OnPaintBackground(PaintEventArgs e)

{

LinearGradientBrush b = new LinearGradientBrush(this.ClientRectangle,

Color.Blue,Color.AliceBlue,90f);

e.Graphics.FillRectangle(b,this.ClientRectangle);

b.Dispose();

}



private void Form1_Paint(object sender, System.Windows.Forms.PaintEventArgs e)

{

// 创建一个小的Bitmap

Bitmap bm = new Bitmap(this.ClientSize.Width/4,this.ClientSize.Height/4);



//得到 Graphics 对象

Graphics g = Graphics.FromImage(bm);



// 必须使用 antialiased rendering hint

g.TextRenderingHint = TextRenderingHint.AntiAlias;



//this matrix zooms the text out to 1/4 size and offsets it by a little right and down



Matrix mx = new Matrix(0.25f,0,0,0.25f,3,3);



g.Transform = mx;



// 画阴影



g.DrawString(TextToDraw,Font,new SolidBrush( Color.FromArgb(128, Color.Black)),

10, 10, StringFormat.GenericTypographic );



g.Dispose();

e.Graphics.InterpolationMode=InterpolationMode.HighQualityBicubic;

e.Graphics.TextRenderingHint=TextRenderingHint.AntiAlias;

e.Graphics.DrawImage(bm,this.ClientRectangle,0,0,bm.Width,bm.Height,GraphicsUnit.Pixel);

e.Graphics.DrawString(TextToDraw,Font,Brushes.White,10,10,StringFormat.GenericTypographic);

bm.Dispose();

}

}

}


 
 
本站关键词:
|东莞雅虎推广|东莞网站建设|东莞网页设计|东莞网络公司|网站建设|网页设计|网络公司|网站制作|网站开发|东莞域名空间|东莞广告公司|东莞广告设计||东莞雅虎推广|东莞网站建设|东莞网页设计|东莞网络公司|网站建设|网页设计|网络公司|网站制作|网站开发|东莞域名空间|东莞广告公司|东莞广告设计||东莞雅虎推广|东莞网站建设|东莞网页设计|东莞网络公司|网站建设|网页设计|网络公司|网站制作|网站开发|东莞域名空间|东莞广告公司|东莞广告设计||东莞雅虎推广|东莞网站建设|东莞网页设计|东莞网络公司|网站建设|网页设计|网络公司|网站制作|网站开发|东莞域名空间|东莞广告公司|东莞广告设计||东莞雅虎推广|东莞网站建设|东莞网页设计|东莞网络公司|网站建设|网页设计|网络公司|网站制作|网站开发|东莞域名空间|东莞广告公司|东莞广告设计||东莞雅虎推广|东莞网站建设|东莞网页设计|东莞网络公司|网站建设|网页设计|网络公司|网站制作|网站开发|东莞域名空间|东莞广告公司|东莞广告设计||东莞雅虎推广|东莞网站建设|东莞网页设计|东莞网络公司|网站建设|网页设计|网络公司|网站制作|网站开发|东莞域名空间|东莞广告公司|东莞广告设计||东莞雅虎推广|东莞网站建设|东莞网页设计|东莞网络公司|网站建设|网页设计|网络公司|网站制作|网站开发|东莞域名空间|东莞广告公司|东莞广告设计||东莞雅虎推广|东莞网站建设|东莞网页设计|东莞网络公司|网站建设|网页设计|网络公司|网站制作|网站开发|东莞域名空间|东莞广告公司|东莞广告设计||东莞雅虎推广|东莞网站建设|东莞网页设计|东莞网络公司|网站建设|网页设计|网络公司|网站制作|网站开发|东莞域名空间|东莞广告公司|东莞广告设计||东莞雅虎推广|东莞网站建设|东莞网页设计|东莞网络公司|网站建设|网页设计|网络公司|网站制作|网站开发|东莞域名空间|东莞广告公司|东莞广告设计||东莞雅虎推广|东莞网站建设|东莞网页设计|东莞网络公司|网站建设|网页设计|网络公司|网站制作|网站开发|东莞域名空间|东莞广告公司|东莞广告设计|
域名注册 | 虚拟主机 | 网站建设 | 网站推广 | 广告设计 | 帮助中心 | 软件中心 | 关于腾达
东莞市腾达信息工程有限公司      本站网络实名: 东莞网站建设
地址:东莞市新城市中心区第一国际B座610   邮编:523007
电话:0769-22026071 22026072 传真:0769-22026076 24小时服务热线:13712032014
© 2002~2005 腾达网络   版权所有