Skip to main content
GameDev.net gamedev.net
🔒 Locked

[.net] Window Border/Focus

Started by Geronimo2000 Apr 4, 2005 at 7:42 PM 5 replies 1k views
Original Post
Geronimo2000
Geronimo2000
With C# or Win32 windows, a window's top border is blue when it's active and grayed when it's not. I see many applications that are able to spawn off regular windows into the foreground. The new window's border will be blue since it's active, BUT the original window border will still be blue as if it were still active. I would like to know how to copy this behavior. I'm guessing the answer is simple, but I've been unsuccessful so far in coming up with the right solution (I can't focus or activate both windows). Thanks for any help or advice you can provide.
turnpast
turnpast
What is the behavior when you set the child form's Owner property to the parent form? It will always appear on top of the owner form and minimize if the owner minimizes, but I am not sure about the bar color.

Geronimo2000
Geronimo2000
I thought that could be it since I hadn't explored the Owner property, but it doesn't appear to be. Thanks for the idea though - I have not been utilizing that property for other obvious uses.
Geronimo2000
Geronimo2000
That was one of my original ideas, but it didn't work. I already tried (in a C# environment) the FormBorderstyles FixedToolWindow and SizableToolWindow - resulting behavior was the same as before.
pim
pim
How do you want the top form to interact with the other form? you could use MDI or perhaps a dialog window if you shouldn't be able to use the first form at the same time..
Geronimo2000
Geronimo2000
I would like the child window to be a regular non-modal window that I can design myself. I've never used MDI, but I suspect it's not what other applications use to pull off this trick off - of course, I could be dead wrong, but that's just my guess. I'll probably play around with the MDI properties just to be sure.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.