1樓:帳號已登出
dim i
private sub form_load()timer1.enabled = falsetimer1.interval = 1000end sub
private sub command1_click()timer1.enabled = truetext1.setfocus
end sub
private sub timer1_timer()text1.selstart = i
text1.sellength = 3
if i > len(text1.text) then timer1.enabled = false
i = i + 3
end sub
2樓:
dim n as integer, i as integerprivate sub command1_click()n = len(text1.text) \ 3i = -1
timer1.enabled = not timer1.enabled
text1.setfocus
end sub
private sub timer1_timer()i = i + 1
if i < n then
text1.selstart = i * 3text1.sellength = 3
elseif i = n then
text1.selstart = i * 3text1.sellength = len(text1.text) - i * 3
i = -1
end if
end sub
如何用VB實現秦九昭演算法
第一題解 作出底邊bc上的高ad 等腰 abc的周長為26 ab ac bc 26 ab ac,且ab bc 4 bc 4 bc 4 bc 26 3bc 18 bc 6 ab ac 6 4 10 bc 2 2 ad 2 ab 2 3 2 ad 2 10 2 ad 2 100 9 91 ad 根號91...
VB如何實現顏色隨機選擇,VB如何實現顏色隨機選擇
private sub form click randomize timer backcolor rgb rnd 256,rnd 256,rnd 256 end sub 這是bai改變窗體du背景顏 zhi色的 dao過版 程 權。rgb int rnd 256 int rnd 256 int rn...
在vb中如何用迴圈語句給多個連續文字框賦值
dim obj as object,objname as string,i as integer i 0 for each obj in me.controls 列舉窗體所有控制元件 debug.print typename obj if typename obj textbox then 判讀是否...