使程序的标题条闪烁
发表时间:2024-06-08 来源:明辉站整理相关软件相关文章人气:
[摘要]建立新的项目文件,添加模块文件,并填写如下代码: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
在窗体中添加两个按钮和一个计时器,并用设置以下属性:
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运行程序。