扫一扫
分享文章到微信
扫一扫
关注官方公众号
至顶头条
作者:王凯明 来源:论坛 2007年11月14日
关键字:
using System; using System.Drawing; using System.Windows.Forms; public class Fonts:Form { Button b1 = new Button(); TextBox tb = new TextBox(); FontDialog flg = new FontDialog(); public Fonts() { b1.Click += new EventHandler(b1_click); b1.Text = "选择字体"; tb.Location = new Point(50,50); this.Controls.Add(b1); this.Controls.Add(tb); } public void b1_click(object sender, EventArgs e) { clg.ShowDialog(); tb.FontName = flg.Font; } public static void Main() { Application.Run(new Fonts()); } } |
如果您非常迫切的想了解IT领域最新产品与技术信息,那么订阅至顶网技术邮件将是您的最佳途径之一。