明輝手游網(wǎng)中心:是一個免費提供流行視頻軟件教程、在線學(xué)習(xí)分享的學(xué)習(xí)平臺!

使程序的標(biāo)題條閃爍

[摘要]建立新的項目文件,添加模塊文件,并填寫如下代碼:Public Declare Function FlashWindow _Lib "user32" (ByVal hwnd As Long, _ByVal bInvert As Long) As Long在窗體中添加兩個按鈕和一個...
建立新的項目文件,添加模塊文件,并填寫如下代碼:
Public Declare Function FlashWindow _Lib "user32" (ByVal hwnd As Long, _ByVal bInvert As Long) As Long
在窗體中添加兩個按鈕和一個計時器,并用設(shè)置以下屬性:
command1.caption="開始"
command2.caption="停止"
timer1.interval=500 ''每0.5秒閃爍一次
timer1.enabled=false
Private Sub Timer1_Timer()
a& = FlashWindow(Me.hwnd, 1)
End Sub
Private Sub Command1_Click()
Timer1.Enabled = True
End Sub
Private Sub Command2_Click()
Timer1.Enabled = False
End Sub
按F5運行程序。