Question:
在C#中Form1.cs籍救,Program.cs,form.Designer.cs,中蔫磨,我把繪圖的代碼寫在Form1.cs己肮,但是無法執(zhí)行!
我其實(shí)就是把繪圖的代碼,也就是Form1_paint事件直接寫在Form1.cs那里茎刚,執(zhí)行起來沒有錯誤襟锐!但是沒有畫圖,和沒有代碼一樣膛锭。粮坞。。這是為什么初狰,在C#中代碼分成了三部分莫杈,我只知道要寫在Form1.cs,他們是怎樣連接奢入?要怎樣寫才能讓我的繪圖代碼執(zhí)行筝闹?
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);