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

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

[摘要]建立新的項(xiàng)目文件,添加模塊文件,并填寫如下代碼:Public Declare Function FlashWindow _Lib "user32" (ByVal hwnd As Long, _ByVal bInvert As Long) As Long在窗體中添加兩個(gè)按鈕和一個(gè)...
建立新的項(xiàng)目文件,添加模塊文件,并填寫如下代碼:
Public Declare Function FlashWindow _Lib "user32" (ByVal hwnd As Long, _ByVal bInvert As Long) As Long
在窗體中添加兩個(gè)按鈕和一個(gè)計(jì)時(shí)器,并用設(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運(yùn)行程序。