'Open
New Project.Add Module and write down this public
function on it. Public Declare Function FlashWindow Lib "user32" (ByVal hwnd As Long, ByVal bInvert As Long) As Long 'Put One button and one timer on the form. And write down the codes below on it. Private Sub Command1_Click() If Command1.Caption = "Flash" Then Timer1.Enabled = True Command1.Caption = "Stop" Else Timer1.Enabled = False Command1.Caption = "Flash" End If End Sub Private Sub Form_Load() With Timer1 .Interval = 100 .Enabled = False End With Command1.Caption = "Flash" End Sub Private Sub Timer1_Timer() Static c As Integer If c = 0 Then c = 1 Else c = 0 End If t& = FlashWindow(Me.hwnd, c) End Sub
|