Danmilkman Posted November 10, 2003 Posted November 10, 2003 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. Quote Intellectuals solve problems, geniuses prevent them!
wyrd Posted November 10, 2003 Posted November 10, 2003 Yes. Quote Gamer extraordinaire. Programmer wannabe.
Danmilkman Posted November 10, 2003 Author Posted November 10, 2003 I should have known. :D And could you explain how?? Quote Intellectuals solve problems, geniuses prevent them!
*Gurus* divil Posted November 11, 2003 *Gurus* Posted November 11, 2003 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. Quote MVP, Visual Developer - .NET Now you see why evil will always triumph - because good is dumb. My free .NET Windows Forms Controls and Articles
Danmilkman Posted November 12, 2003 Author Posted November 12, 2003 Divil, thanks in advance. I'll try it tomorrow. Hope it works. Quote Intellectuals solve problems, geniuses prevent them!
Danmilkman Posted November 19, 2003 Author Posted November 19, 2003 sorry didn't work, give me some sample code please, perhaps i did it wrong... thnx. Quote Intellectuals solve problems, geniuses prevent them!
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.