Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

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 :-\

Posted
[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....:)

Posted
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.

-Sean
Posted
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? :-\

Posted
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..

  • Leaders
Posted (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 by snarfblam
[sIGPIC]e[/sIGPIC]
Posted

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..

  • 3 months later...
Posted

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...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...