看板 Programming 關於我們 聯絡資訊
我是一位學vb.net2005的新手 有個問題想請教各位: 在text中輸入數字後 按"確定"按鈕後 button的長與寬會變大2倍 語法是這樣下的: Button1.Width = Button1.Width * 2 Button1.Height = Button1.Height * 2 但是再按一次確定鈕 button又再變兩倍大 等於按兩次確定按鈕就被成4倍了(等於有是bug) 但是要不管按幾次鈕都只放大2倍就好了 我的想法是 應該是用 if then else end if 但是 寫不出來 還是我的方向錯了呢? -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 219.70.165.248
chph:最簡單的..用一個變數存boolean來判斷 59.127.178.172 03/11 00:20
DRAGONLL:第三行 Button1.Enabled = False 211.74.178.98 03/11 03:02