Results 1 to 2 of 2

Thread: blinking form even if minimized [resolved]

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Mar 2005
    Location
    Manila, Philippines
    Posts
    486

    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

  2. #2
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,709

    Re: blinking form even if minimized

    To flash the titlebar...
    VB Code:
    1. Option Explicit
    2.  
    3. Private Const FLASHW_STOP = 0 'Stop flashing. The system restores the window to its original state.
    4. Private Const FLASHW_CAPTION = &H1 'Flash the window caption.
    5. Private Const FLASHW_TRAY = &H2 'Flash the taskbar button.
    6. 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.
    7. Private Const FLASHW_TIMER = &H4 'Flash continuously, until the FLASHW_STOP flag is set.
    8. Private Const FLASHW_TIMERNOFG = &HC 'Flash continuously until the window comes to the foreground.
    9.  
    10. Private Type FLASHWINFO
    11.     cbSize As Long
    12.     hwnd As Long
    13.     dwFlags As Long
    14.     uCount As Long
    15.     dwTimeout As Long
    16. End Type
    17.  
    18. Private Declare Function FlashWindowEx Lib "user32" (pfwi As FLASHWINFO) As Boolean
    19.  
    20. Private Sub Form_Resize()
    21.     Dim FlashInfo As FLASHWINFO
    22.     If Me.WindowState = vbMinimized Then
    23.         With FlashInfo
    24.             .cbSize = Len(FlashInfo)
    25.             .dwFlags = FLASHW_ALL Or FLASHW_TIMER
    26.             'Specifies the rate, in milliseconds, at which the window will be flashed.
    27.             'If dwTimeout is zero, the function uses the default cursor blink rate.
    28.             .dwTimeout = 0
    29.             .hwnd = Me.hwnd
    30.             .uCount = 0
    31.         End With
    32.         FlashWindowEx FlashInfo
    33.     Else
    34.         With FlashInfo
    35.             .cbSize = Len(FlashInfo)
    36.             .dwFlags = FLASHW_STOP
    37.             .hwnd = Me.hwnd
    38.         End With
    39.         FlashWindowEx FlashInfo
    40.     End If
    41. 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 PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI 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
  •  



Click Here to Expand Forum to Full Width