|  |   | 
| (未显示2个用户的23个中间版本) | 
| 第1行: | 第1行: | 
|  | {{用户文华}} |  | {{用户文华}} | 
|  | + |  | 
|  | + |  | 
|  | + |  | 
|  | <br> |  | <br> | 
| − | <center><font size="6" color=blue;">'''我的作品'''</font></center> <font size="5" color="#545454> | + | <center><font size="5" color=blue;">'''我的作品'''</font></center> <font size="5" color="#545454> | 
| − | ----
 |  | 
| − | Graphics gdi(this->GetDC()->m_hDC);  //构造一个GDI+对象
 |  | 
| − |     	Pen red(Color(255,255,0,0),3);   	//构造一个画笔 画笔透明度是255
 |  | 
| − |     	gdi.DrawLine(&red,10,10,50,10);		//画线
 |  | 
| − | 	FontFamily m_font(L"宋体");		
 |  | 
| − | 	Font font(&m_font,24);			//构造字体
 |  | 
| − | 	SolidBrush brush(Color(255,0,0,255));	//输出字符串要构造一个画刷
 |  | 
| − | 	CRect rect;
 |  | 
| − | 	this->GetClientRect(&rect);		//得到客户区大小
 |  | 
| − | 	PointF point(rect.right/2,rect.bottom/2);//坐标点
 |  | 
| − | 	gdi.DrawString(L"中华",2,&font,point,&brush);//输出字符串
 |  | 
| − | ————————————————
 |  | 
| − | 版权声明:本文为CSDN博主「a550853006a」的原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接及本声明。
 |  | 
| − | 原文链接:https://blog.csdn.net/a550853006a/article/details/45769215
 |  | 
|  | ---- |  | ---- | 
|  |  |  |  | 
| − | public partial class Form1 : Form
 | + | [[人类产业与分工]] | 
| − | {
 | + |   | 
| − |     Timer timer = new Timer();
 | + | [[人造“人”]] | 
| − |     string[]lines = { "hellow world", "nihao", "line3", "line4", "line5", "end" };
 | + |   | 
| − |     int currentLine = 0;
 | + | [[WIKI语法学习]] | 
| − |  
 | + |   | 
| − |     public Form1()
 | + | [[从军民团结如一人到生产消费一家亲]] | 
| − |     {
 | + |   | 
| − |         InitializeComponent();
 | + | [[我对NGO和NGO工作的理解]] | 
| − |         timer.Interval = 300;
 | + |   | 
| − |         timer.Tick += delegate { currentLine++; this.Invalidate(); };
 | + | [http://www.cnplugins.com/office/wikiwand-wikipedia-modern/Wikiwand: Wikipedia Modernized(维基百科排版美化插件) Chrome插件] | 
| − |         timer.Start();
 |  | 
| − |     }
 |  | 
| − |  
 |  | 
| − |     protected override void OnPaint(PaintEventArgs e)
 |  | 
| − |     {
 |  | 
| − |         for (int i = 0; i < currentLine % lines.Length; i++)
 |  | 
| − |         {
 |  | 
| − |             e.Graphics.DrawString(lines[i], this.Font, Brushes.Black, 10, 20 * i);
 |  | 
| − |         }
 |  | 
| − |     }
 |  | 
| − | }
 |  |