Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Flashing Taskbar 1

Status
Not open for further replies.

Deltaflyer

Programmer
Oct 11, 2000
184
0
0
GB
How do i make the taskbar flash?

My program is an ICQ style LAN based secure messenger, the management want to allow interoffice communications but not with the outside world. I have done the hard work but can't figure the simple task.

Everyone says that the beep that accompanies the arrival of the message is annoying, so how do i get VB to flash the taskbar just like ICQ and many other programs do?

Thanks for any assistance, DeltaFlyer
The Only Programmer To Crash With Style. LOL
 
Create project with a single form. Place a timer on it, disable the timer, and set the time interval to say 500. Add two command butttons, then drop in this code:
[tt]
Option Explicit

Private Declare Function FlashWindow Lib "user32" (ByVal hwnd As Long, ByVal bInvert As Long) As Long

Private Sub Command1_Click()
Timer1.Enabled = True
End Sub

Private Sub Command2_Click()
Timer1.Enabled = False
FlashWindow Me.hwnd, False 'sets appearance to normal
End Sub

Private Sub Timer1_Timer()
FlashWindow Me.hwnd, True ' toggles appearance
End Sub
 
Cool thanks. DeltaFlyer
The Only Programmer To Crash With Style. LOL
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top