Re: [VB6 ] 不使用TIMER寫跑馬燈發生的問題

看板Visual_Basic作者 (刀霧刃)時間18年前 (2008/01/30 09:59), 編輯推噓1(101)
留言2則, 2人參與, 最新討論串2/2 (看更多)
Dim a As Integer Private Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long) Private Sub Command1_Click() For a = 1 To 4 Select Case a Case 1 Shape1.BackStyle = 1 Shape2.BackStyle = 0 Shape3.BackStyle = 0 Shape4.BackStyle = 0 DoEvents Sleep (500) Beep Case 2 Shape1.BackStyle = 0 Shape2.BackStyle = 1 Shape3.BackStyle = 0 Shape4.BackStyle = 0 DoEvents Sleep (500) Beep Case 3 Shape1.BackStyle = 0 Shape2.BackStyle = 0 Shape3.BackStyle = 1 Shape4.BackStyle = 0 DoEvents Sleep (500) Beep Case 4 Shape1.BackStyle = 0 Shape2.BackStyle = 0 Shape3.BackStyle = 0 Shape4.BackStyle = 1 DoEvents Sleep (500) Beep End Select Next Print a End Sub 建議下次程式全貼... 且排一下版... 有什麼控件也說明一下... 不然還要看你的CODE... 把你沒打上的補完才可以測... -- 常發人好人名片    Yaiba:您好,我是好人       幫正妹組電腦送到府          外加一年到府維護 -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 60.250.78.197

01/30 09:59, , 1F
對了.忘了說.差別只在.DoEvents.睡前沒交出來.別人不能Show
01/30 09:59, 1F

01/30 20:22, , 2F
謝謝Y大 我會改進的感激
01/30 20:22, 2F
文章代碼(AID): #17dze9G8 (Visual_Basic)
文章代碼(AID): #17dze9G8 (Visual_Basic)