Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

Hi everybody,

 

I want to leave you with a little stuff to think about.

 

Let's start:

 

Let say we have a simple chat application just like MSN, now someone sends a message to another person who is playin' Unreal Tournament 2003 or a similar game. This message is never shown to that person because the window doesn't popup over the gameshell. Or it does but the game stops playing.

 

Is it possible to show a form/message on top of the game-shell without disturbing/stopping/crashing the game?

 

Good luck,

 

D@n.

Intellectuals solve problems, geniuses prevent them!
  • *Gurus*
Posted

Look in to the ShowWindow api. You can call this on a window passing SW_SHOWNOACTIVATE to have the window shown but not activated, i.e. it pops up but does steal the focus. Like the Messenger windows.

 

Also, you can use the SetWindowPos api passing HWND_TOPMOST to make that window the topmost window in the z-order on the screen. You have to use this api rather than Form.TopMost = true because doing the latter will make it steal the focus. You have to also pass SWP_NOACTIVATE to this api to stop that happening.

 

I am told there will be a framework equivalent to showing windows without stealing focus in .NET 2.0.

MVP, Visual Developer - .NET

 

Now you see why evil will always triumph - because good is dumb.

 

My free .NET Windows Forms Controls and Articles

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