Results 1 to 2 of 2

Thread: Flashing buttons on taskbars

  1. #1

    Thread Starter
    New Member
    Join Date
    Feb 2000
    Posts
    1

    Post

    I'm sure I've seen this before but I can't for the life of me remember how. I have a program running in the background that beeps users to notify them of a certain event. When this happens I would also like the app's button in the taskbar to flash or at least change color.

    Any ideas?

    thanks

    Ash

  2. #2
    PowerPoster Chris's Avatar
    Join Date
    Jan 1999
    Location
    K-PAX
    Posts
    3,238

    Post

    Add the following code into your program & it solve you question...

    Option Explicit

    Private Declare Function FlashWindow Lib "user32" (ByVal hwnd As Long, ByVal bInvert As Long) As Long
    Private Declare Sub Sleep Lib "kernel32.dll" (ByVal dwMilliseconds As Long)

    Private Sub Command1_Click()
    Dim R&, Cnt%
    For Cnt% = 1 To 50
    DoEvents
    Form1.Caption = "Flash " & Cnt%
    R& = FlashWindow(Form1.hwnd, 1)
    Sleep 500
    Next
    End Sub

    __________________________
    Chris.C
    [email protected]
    Software Engineer

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