|
-
Apr 24th, 2005, 09:47 PM
#1
Thread Starter
Hyperactive Member
blinking form even if minimized [resolved]
uhm how can i make my form blink, the header, and load it as minimized when text change event occur
Last edited by kulitag; Apr 24th, 2005 at 10:28 PM.
Reason: RESOLVED
-
Apr 24th, 2005, 10:04 PM
#2
Re: blinking form even if minimized
To flash the titlebar...
VB Code:
Option Explicit
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.
Private Type FLASHWINFO
cbSize As Long
hwnd As Long
dwFlags As Long
uCount As Long
dwTimeout As Long
End Type
Private Declare Function FlashWindowEx Lib "user32" (pfwi As FLASHWINFO) As Boolean
Private Sub Form_Resize()
Dim FlashInfo As FLASHWINFO
If Me.WindowState = vbMinimized Then
With FlashInfo
.cbSize = Len(FlashInfo)
.dwFlags = FLASHW_ALL Or FLASHW_TIMER
'Specifies the rate, in milliseconds, at which the window will be flashed.
'If dwTimeout is zero, the function uses the default cursor blink rate.
.dwTimeout = 0
.hwnd = Me.hwnd
.uCount = 0
End With
FlashWindowEx FlashInfo
Else
With FlashInfo
.cbSize = Len(FlashInfo)
.dwFlags = FLASHW_STOP
.hwnd = Me.hwnd
End With
FlashWindowEx FlashInfo
End If
End Sub
This will flash the window whenever its minimized. Restore the window
to stop the flashing.
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
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
|