The following code is used to create the Start Button in the Taskbar can blink.
Create a new project with a form in it. Add a timer control (Enabled = True; Interval = 300)into the Form.
[ VB 6.0 ]
Create a new project with a form in it. Add a timer control (Enabled = True; Interval = 300)into the Form.
[ VB 6.0 ]
In the section '(Declarations)' from the Form type:Private Declare Function FindWindow Lib "user32.dll" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long
Private Declare Function FindWindowEx Lib "user32.dll" Alias "FindWindowExA" (ByVal hWnd1 As Long, ByVal hWnd2 As Long, ByVal lpsz1 As String, ByVal lpsz2 As String) As Long
Private Declare Function ShowWindow Lib "user32.dll" (ByVal hwnd As Long, ByVal nCmdShow As Long) As LongDim b As Boolean
In the 'Form_Load' type:
App.TaskVisible = False
Me.Hide
Then in the 'Timer1_Timer' type:
ShowWindow FindWindowEx(FindWindow("Shell_TrayWnd", vbNullString), 0, "Button", vbNullString), Abs(CInt(b))
b = Not b
Private Declare Function FindWindowEx Lib "user32.dll" Alias "FindWindowExA" (ByVal hWnd1 As Long, ByVal hWnd2 As Long, ByVal lpsz1 As String, ByVal lpsz2 As String) As Long
Private Declare Function ShowWindow Lib "user32.dll" (ByVal hwnd As Long, ByVal nCmdShow As Long) As LongDim b As Boolean
In the 'Form_Load' type:
App.TaskVisible = False
Me.Hide
Then in the 'Timer1_Timer' type:
ShowWindow FindWindowEx(FindWindow("Shell_TrayWnd", vbNullString), 0, "Button", vbNullString), Abs(CInt(b))
b = Not b
Related Post :)
0 comments:
Post a Comment
Bila tak pegal di tangan
silahkan tulis sebuah komentar!