views:

737

answers:

2
+6  A: 

Why can't you get rid of the client area? Just resize the main form so that it's as thin as you can make it.

You may be implementing the floating windows as UserControls in the main form's Controls collection. If so, there are two ways you can deal with this:

  1. Implement the floating windows as actual windows. Show them using "frmToolWindows.Show(this);" (this will keep them always on top of your main form).
  2. If you need to keep the floaters as UserControls, you can make the client area of your main form transparent by setting the form's TransparencyKey property to some arbitrary color (Color.Red, for example) and then setting the form's BackColor property to the same color. This will make your form transparent and able to be clicked through.
MusiGenesis
Thanks. Getting rid of the client area by resizing the mainform is indeed the way to do it, however, that comes with some other details. When you resize the window you can expose the client area again, and when you maximize the window then it will occupy the entire screen and the client area will hide the desktop.The solution to both problems above is to handle WM_SIZING and WM_GETMINMAXINFO messages and limit the height as required.Regarding floating windows, I detest the second option as it adds unnecessary burden. Your first option is a good one. Thanks for your help.
Wessam Bahnassi
You don't necessarily want the other windows always on top of the main window. That can the main window's toolbar hard to access.
Rob Kennedy
A: 

Please don't make a UI like this. It is very non-standard, and doesn't gain anything in the realm of usability. You could simplify things by keeping it all in one window like Visual Studio.

John Fisher
The down-votes are because the question wasn't "should I make my UI like this?" Also, I actually prefer this style of IDE (from my Visual Basic days) on my laptop, as the current Visual Studio layout requires a big monitor to be most effective.
MusiGenesis
I can handle a down-vote, if it increases the overall usability of software.
John Fisher
@John: Unfortunately it doesn't increase the usability of the software to confine everything to the client area of the single main window. Ask any user with multiple monitors how they feel about it. And Visual Studio users have indeed been wishing for better multi monitor support, for years.
mghie
John, you wouldn't get down-votes on this if you'd posted it as a comment to the question, where it belongs. The answer section is for things that actually answer the question that was asked.
Rob Kennedy
Actually, VS 2010 is implementing something alike it because it's multi-monitor friendly, unlike applications that keep everything within a window.
ldsandon
In my case I have to go with this UI style because my app relies on showing other apps windows and allowing you to drag-drop stuff from my window to other apps' windows. If I have a solid client area then users will have to either keep alt-tabbing or resize my app's window to a minimum to coexist with other windows, or have multiple monitors.
Wessam Bahnassi
This user interface is definitely not required for multi-monitor support. Separating the toolbar from the rest of the app is the main difficulty, and there just isn't a great reason for it. Two (or three) containing windows (one for each monitor) could achieve all the same goals, without splitting each panel into separate floating windows. And Visual Studio is doing it right by allowing the user to decide how his windows work: floating, docked, document, etc.
John Fisher
This question is tagged "Delphi", and you're basically saying that Delphi's UI is crap and that it should be more like Visual Studio. Oooooooh! I think it's safer to walk into a Hell's Angels bar and shout: "I JUST PISSED ON YOUR STUPID MOPEDS YOU FAGS!".
Wouter van Nifterick
@wouter: You are so right... :)
The_Fox
@Wouter: The question was tagged Winforms first.
John Fisher