使窗体的标题闪烁起来!
建立新的项目文件,添加模块文件,并填写如下代码:
Public Declare Function FlashWindow Lib "user32" (ByVal hwnd As Long, ByVal bInvert _ As Long) As Long
在窗体中添加两个按钮和一个计时器,并用设置以下属性: 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