Hi...
i want to make flash window...
after program completed something task then that window will flash.
i ask my friend and he said to use api function. but i don't have an idea to do this.
please help me masters...

any help will be appreciated.

best regard
Jade

Recommended Answers

All 4 Replies

Hi...
i want to make flash window...
after program completed something task then that window will flash.
i ask my friend and he said to use api function. but i don't have an idea to do this.
please help me masters...

any help will be appreciated.

best regard
Jade

here is a sample snippet for you. try it. just place a command button and a timer on your form for testing. set an interval for the timer. for ideal experience set it to 1000.

give me a feedback after you try this code.

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 Form_Load()
Timer1.Enabled = False
End Sub

Private Sub Timer1_Timer()
FlashWindow Me.hWnd, True
End Sub

hope this will help you.

regards
Shouvik

commented: Great Code :) +1

'This project needs a timer,Interval 1000 for normally

'In general section
Private Declare Function FlashWindow Lib "user32" (ByVal hwnd As Long, ByVal bInvert As Long) As Long
Const Invert = 1

Private Sub Timer1_Timer()
    'Flash the window
    FlashWindow Me.hwnd, Invert
End Sub
commented: Great Code :) +1
commented: help me +1

yes...
pretty much.
thanks shouivik and jx_man :)

you're welcome :)

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.