FlashWindow API ?
-
Ive got a button on a form and am trying to get the flashwindow api to work with the form , however it seems i don't understand it! As i have never done an api call im not too surprised.!!
Declare Function FlashWindow Lib "user32" Alias "FlashWindow" (ByVal hwnd As Long, ByVal bInvert As Long) As Long Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load End Sub Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click FlashWindow(1, True)'what are the arguments this call should use? End Sub
no error when i click button, just nothing happens? Any help will be appreciated.:confused: -
Ive got a button on a form and am trying to get the flashwindow api to work with the form , however it seems i don't understand it! As i have never done an api call im not too surprised.!!
Declare Function FlashWindow Lib "user32" Alias "FlashWindow" (ByVal hwnd As Long, ByVal bInvert As Long) As Long Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load End Sub Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click FlashWindow(1, True)'what are the arguments this call should use? End Sub
no error when i click button, just nothing happens? Any help will be appreciated.:confused:For all thinks DllImport, first place to look is http://www.pinvoke.net[^] This search[^] on that site brings up both FlashWindow and FlashWindowEx information, along with source code in C# (which works as ive tried both). However, in simple answer to your question, the first parameter is the Handle of the window you want to flash, and the second should be true to flash the window once. So assuming your Button1 is on a form:
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click FlashWindow(this.Handle, True)' these are the arguments you should use! End Sub
Current blacklist svmilky - Extremely rude | FeRtoll - Rude personal emails | ironstrike1 - Rude & Obnoxious behaviour -- modified at 6:48 Wednesday 24th May, 2006
-
Ive got a button on a form and am trying to get the flashwindow api to work with the form , however it seems i don't understand it! As i have never done an api call im not too surprised.!!
Declare Function FlashWindow Lib "user32" Alias "FlashWindow" (ByVal hwnd As Long, ByVal bInvert As Long) As Long Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load End Sub Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click FlashWindow(1, True)'what are the arguments this call should use? End Sub
no error when i click button, just nothing happens? Any help will be appreciated.:confused: