美文网首页
winform Form1.designer.cs中添加事件

winform Form1.designer.cs中添加事件

作者: 球球1104 | 来源:发表于2017-02-15 10:19 被阅读0次

Question:
在C#中Form1.cs,Program.cs,form.Designer.cs,中,我把绘图的代码写在Form1.cs,但是无法执行!
我其实就是把绘图的代码,也就是Form1_paint事件直接写在Form1.cs那里,执行起来没有错误!但是没有画图,和没有代码一样。。。这是为什么,在C#中代码分成了三部分,我只知道要写在Form1.cs,他们是怎样连接?要怎样写才能让我的绘图代码执行?

1.png

//
// dataGridView1
//
this.dataGridView1.RowPostPaint += new System.Windows.Forms.DataGridViewRowPostPaintEventHandler(this.dataGridView1_RowPostPaint);

//
// QCCheckHome
//
this.Load+= new System.EventHandler(this.Home_Load);
this.SizeChanged += new System.EventHandler(this.Form_SizeChanged);

相关文章

网友评论

      本文标题:winform Form1.designer.cs中添加事件

      本文链接:https://www.haomeiwen.com/subject/lrtqwttx.html