Chinaunix首页 | 论坛 | 博客
  • 博客访问: 552241
  • 博文数量: 156
  • 博客积分: 0
  • 博客等级: 民兵
  • 技术积分: 1183
  • 用 户 组: 普通用户
  • 注册时间: 2013-11-22 11:42
文章分类

全部博文(156)

文章存档

2015年(67)

2014年(89)

分类: C#/.net

2014-12-09 21:49:34


  1. using System;
  2. using System.Collections.Generic;
  3. using System.ComponentModel;
  4. using System.Data;
  5. using System.Drawing;
  6. using System.Linq;
  7. using System.Text;
  8. using System.Windows.Forms;

  9. namespace mou
  10. {
  11.     public partial class Form1 : Form
  12.     {
  13.         Graphics FormCGI;

  14.         public Form1()
  15.         {
  16.             InitializeComponent();
  17.             FormCGI = this.CreateGraphics();
  18.         }

  19.         private void HeiTiButton_Click_1(object sender, EventArgs e)
  20.         {
  21.             Font myFont = new Font("黑体", 40); //Font:字体
  22.             Brush myBrush = new SolidBrush(Color.Black);

  23.             FormCGI.Clear(Color.LightGray);
  24.             FormCGI.DrawString("你好", myFont, myBrush, 350, 12);
  25.         }

  26.         private void SongTiButton_Click(object sender, EventArgs e)
  27.         {
  28.             Font myFont = new Font("宋体", 40); //Font:字体
  29.             Brush myBrush = new SolidBrush(Color.Black);

  30.             FormCGI.Clear(Color.LightGray);
  31.             FormCGI.DrawString("你好", myFont, myBrush, 350, 74);
  32.         }

  33.         private void LiShuButton_Click(object sender, EventArgs e)
  34.         {
  35.             Font myFont = new Font("隶书", 40); //Font:字体
  36.             Brush myBrush = new SolidBrush(Color.Black);

  37.             FormCGI.Clear(Color.LightGray);
  38.             FormCGI.DrawString("你好", myFont, myBrush, 350, 139);
  39.         }

  40.         private void KaiShuButon_Click(object sender, EventArgs e)
  41.         {
  42.             Font myFont = new Font("楷书", 40); //Font:字体
  43.             Brush myBrush = new SolidBrush(Color.Black);

  44.             FormCGI.Clear(Color.LightGray);
  45.             FormCGI.DrawString("你好", myFont, myBrush, 350, 203);
  46.         }

  47.         private void MeriyoButton_Click(object sender, EventArgs e)
  48.         {
  49.             Font myFont = new Font("meiryo", 40); //Font:字体
  50.             Brush myBrush = new SolidBrush(Color.Black);

  51.             FormCGI.Clear(Color.LightGray);
  52.             FormCGI.DrawString("你好", myFont, myBrush, 350, 267);
  53.         }

  54.         private void ArButton_Click(object sender, EventArgs e)
  55.         {
  56.             Font myFont = new Font("ar", 40); //Font:字体
  57.             Brush myBrush = new SolidBrush(Color.Black);

  58.             FormCGI.Clear(Color.LightGray);
  59.             FormCGI.DrawString("你好", myFont, myBrush, 350, 399);
  60.         }

  61.         private void HuaWenHuPoButton_Click(object sender, EventArgs e)
  62.         {
  63.             Font myFont = new Font("华文琥珀", 40); //Font:字体
  64.             Brush myBrush = new SolidBrush(Color.Black);

  65.             FormCGI.Clear(Color.LightGray);
  66.             FormCGI.DrawString("你好", myFont, myBrush, 350, 334);
  67.         }
            }
        }

阅读(2093) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~