作者ginzu (英文很重要?!)
看板Programming
标题[问题] 按钮放大後可缩回来(vb.net)
时间Mon Mar 10 23:38:48 2008
我是一位学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
1F:推 chph:最简单的..用一个变数存boolean来判断 59.127.178.172 03/11 00:20
2F:推 DRAGONLL:第三行 Button1.Enabled = False 211.74.178.98 03/11 03:02