raffyreig Posted March 4, 2005 Posted March 4, 2005 Hi guys...just wondring if you can help me out with my problem relevant to this one. i want to know which window is active on the desktop?. i'm implementing a flashwindow function..If my application is not the current active window on the desktop it should flash on windows status bar..how can i trigger the flash event ? Thanks... More power !!! -Raffy :-\ Quote
stustarz Posted March 4, 2005 Posted March 4, 2005 You could use the forms lostfocus event and trigger your function to flash the taskbar from there Quote Visit: VBSourceSeek - The VB.NET sourcecode library "A mere friend will agree with you, but a real friend will argue."
*Gurus* Derek Stone Posted March 4, 2005 *Gurus* Posted March 4, 2005 [api]FlashWindow[/api] Quote Posting Guidelines
raffyreig Posted March 7, 2005 Author Posted March 7, 2005 [api]FlashWindow[/api] Thanks you.... :cool: i'll inform as soon as i test the code.. Quote
raffyreig Posted March 7, 2005 Author Posted March 7, 2005 [api]FlashWindow[/api] Sir I have already the code for the FlashWindow..my problem is how to get the open windows on the desktop? ...for me to trigger the flashwindow whenever my application is not the open windows onthe desktop... Thanks!!!!....hope you can help me out with this problem....:) Quote
coldfusion244 Posted March 7, 2005 Posted March 7, 2005 Sir I have already the code for the FlashWindow..my problem is how to get the open windows on the desktop? ...for me to trigger the flashwindow whenever my application is not the open windows onthe desktop... You want to find the handle of a window that doesn't belong to your program? If so, look at FindWindow and FindWindowEx API. If it belongs to your program you should know it once you create the window. Quote -Sean
raffyreig Posted March 7, 2005 Author Posted March 7, 2005 You want to find the handle of a window that doesn't belong to your program? If so' date=' look at FindWindow and FindWindowEx API. If it belongs to your program you [i']should[/i] know it once you create the window. How will i know its the topmost screen onthe desktop? :-\ Quote
coldfusion244 Posted March 7, 2005 Posted March 7, 2005 How will i know its the topmost screen onthe desktop? :-\ Why not use SetWindowLong and make it always topmost? Quote -Sean
raffyreig Posted March 7, 2005 Author Posted March 7, 2005 Why not use SetWindowLong and make it always topmost?[/QUO my application would only blink on the taskbar when a report has been generated and I am not currently on my applications window.. Quote
Leaders snarfblam Posted March 7, 2005 Leaders Posted March 7, 2005 (edited) You can use Me.Focus (this.Focus in c#) which will just focus your form (in windows xp (maybe windows me too, i forget) this will actually flash the taskbar button. Also, try using the shared System.Windows.Forms.ActiveForm. If none of the forms in your app have focus (which generally means your app doesnt have focus) the function returns nothing. So if ActiveForm() is nothing, call FlashWindowEx (or FlashWindow, whichever you are using). [Edit]I Lied. Me.Focus doesn't do what I thought it did. I was thinking of Me.Activate().[/Edit] Edited March 7, 2005 by snarfblam Quote [sIGPIC]e[/sIGPIC]
raffyreig Posted March 8, 2005 Author Posted March 8, 2005 Thank you guys for your generous help....:).. I just want to add this question.. in VB.Net, when is the (Form Event) activated occur? Can i put my flashwindow code here.. I tried to put the flashwindowcode in the load event but then the windows flashes before the Actual form becomes visible.. Quote
Ieuan Posted June 9, 2005 Posted June 9, 2005 You can monitor all active windows and inactive windows through API Functions(i really can't remember which function)... You can compute any part of the screen with the use of ScreenTwipsPerPixelX and ScreenTwipsPerPixelY (i'm not sure with it, just that as i remember it sounds like those).... And with flash, i know i've tried it once just i can't remember...i'll check it out... Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.