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

C#/.NET: "Always on top" toolbar windows

Started by MrAccident Sep 11, 2006 at 10:50 PM 0 replies 6.6k views
Original Post
MrAccident
MrAccident
I'm currently putting together a simple docking control bar framework in C# with Windows Forms, and I'm running into a bit of a pickle. What I want is to have a top-level form that will be used for control bars that are floating. Naturally, these control bars need to remain above the application's main window, even when they're inactive. The problem is, I can't seem to figure out how to do this. I've hunted around on Google, MSDN, and CodeProject a bit, but I can't seem to find anything on this particular subject. I found a couple of things that looked at first like they might help, but they always involved calling into the Win32 API, and didn't really do what I wanted anyway. All I've been able to find in .NET is the Form.TopMost property, but that puts the form above everything, not just my main application window. Essentially, I just want a tool window form that behaves similar to the docking control bars in MFC. Does anybody know how to do this in .NET? Any help would be greatly appreciated.
MrAccident
MrAccident
Aw, crikey. It just figures I was overlooking the obvious. [imwithstupid]

Form.Show(IWin32Window owner) was the method I wanted all along. I just didn't give it a second look because I missed the fact that System.Windows.Forms.Control implements the IWin32Window interface. D'oh!

Topic Locked

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

Sign in to reply to this topic.