- 最後登錄
- 2024-5-6
- 在線時間
- 5290 小時
- 註冊時間
- 2014-7-23
- 閱讀權限
- 95
- 精華
- 0
- UID
- 14661398
- 帖子
- 20
- 積分
- 722 點
- 潛水值
- 38470 米
| 如果你忘記伊莉的密碼,請在登入時按右邊出現的 '找回密碼'。輸入相關資料後送出,系統就會把密碼寄到你的E-Mail。 請問各位
為何我把drawline那一行改放到button1_Click中
按button1時卻無任何反應- public partial class Form1 : Form
- {
- Graphics g;
- public Form1()
- {
- InitializeComponent();
- pictureBox1.Image = new Bitmap(pictureBox1.Width, pictureBox1.Height);
- g = Graphics.FromImage(pictureBox1.Image);
- g.Clear(Color.White);
- g.DrawLine(new Pen(Color.Black), 0, 0, pictureBox1.Width, pictureBox1.Height);
- }
- private void pictureBox1_Click(object sender, EventArgs e)
- {
- }
- private void button1_Click(object sender, EventArgs e)
- {
- }
複製代碼 ... |
|