|
-
Aug 17th, 2000, 02:04 PM
#1
Thread Starter
Member
Does anyone know how to make the title of a program flash in the taskbar like, for example, ICQ does whenever you recieve a new message, or the dial-up conection thing?
Visual Basic 6 Professional Edition
Captain Pinko
also:
Turbo Pascal, Turing, QBasic
-
Aug 17th, 2000, 02:16 PM
#2
You can use the FlashWindow Api for this. You could combine it with a timer.
It accepts the hwnd of the form to flash, and bInvert (True (non-zero) to toggle the windows caption, and false to return to the original state) as parameters. The return value is True non-zero if the window was active before the call.
The declaration is as follows:
Declare Function FlashWindow Lib "user32" (ByVal hwnd As Long, ByVal bInvert As Long) As Long
-
Aug 17th, 2000, 02:17 PM
#3
Monday Morning Lunatic
Add a Timer (tmrTimer), and a CommandButton (cmdFlash) to a new form. Add this code:
Code:
Private Declare Function FlashWindow Lib "user32" (ByVal hwnd As Long, ByVal bInvert As Long) As Long
Private Sub cmdFlash_Click()
FlashWindow Me.hwnd, 1
tmrFlash.Enabled = Not tmrFlash.Enabled
If tmrFlash.Enabled Then
cmdFlash.Caption = "&Stop"
Else
cmdFlash.Caption = "&Flash Window"
End If
End Sub
Private Sub tmrFlash_Timer()
FlashWindow frmFlash.hwnd, 1
End Sub
Make sure that the timer is disabled, then run.
I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
-- Linus Torvalds
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|