|
-
May 27th, 2001, 07:00 AM
#1
Thread Starter
New Member
Blinking Window upon event?
Hello, all....
I was wondering if there was a way to make the window blink (while in start menu, etc.) upon an event? I have seen it done with various messaging programs but was never able to duplicate it.
Any help is greatly appreciated.
'Till next time..
--Sean Killeen
Web Master, Web/Program Designer/Developer, content engineer
InterFall Design -- http://www.InterFall.com
"Where the Internet Flows"
-
May 27th, 2001, 07:41 AM
#2
PowerPoster
Try this code.
Code:
Option Explicit
'//WIN32API Function
Private Declare Function FlashWindowEx Lib "user32" (pfwi As FLASHWINFO) As Boolean
'//WIN32API Constant
Private Const FLASHW_STOP = 0 'Stop flashing. The system restores the window to its original state.
Private Const FLASHW_CAPTION = &H1 'Flash the window caption.
Private Const FLASHW_TRAY = &H2 'Flash the taskbar button.
Private Const FLASHW_ALL = (FLASHW_CAPTION Or FLASHW_TRAY) 'Flash both the window caption and taskbar button. This is equivalent to setting the FLASHW_CAPTION Or FLASHW_TRAY flags.
Private Const FLASHW_TIMER = &H4 'Flash continuously, until the FLASHW_STOP flag is set.
Private Const FLASHW_TIMERNOFG = &HC 'Flash continuously until the window comes to the foreground.
'//WIN32API Structure
Private Type FLASHWINFO
cbSize As Long
hwnd As Long
dwFlags As Long
uCount As Long
dwTimeout As Long
End Type
Private Sub Command1_Click()
Dim FlashInfo As FLASHWINFO
With FlashInfo
.cbSize = Len(FlashInfo)
.dwFlags = FLASHW_ALL Or FLASHW_TIMER
.dwTimeout = 0
.hwnd = Me.hwnd
.uCount = 0
End With
FlashWindowEx FlashInfo
End Sub
-
May 27th, 2001, 07:50 AM
#3
-
May 27th, 2001, 07:59 AM
#4
PowerPoster
anoop007, FlashWindow will not continue flash the window. For that effeect, you need to put the code into a loop. Try the FlashWindowEx
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
|