Hi,
Is there a way to stop floating windows from being shown on top of the main form they originate from. I understand this has to do with the owner property of the floating window, but my users do not :) Can I muck with the floating window somehow to stop this behavior? Hacky solutions are welcome...
Thanks,
Bill
Hi Bill
If you just want to stop windows from being unpinned then:
If you do want to float windows, but would like the controls under the window to move about, then that would be a real complex job beyond my knowledge.
Hope this helps
Regards, PenPal1999
i want floating windows not to appear on top of the form they were floated from. In case anyone cares i've hacked around it by clearing out the owner property of the parent form when the control is floating like this :
Form f = FindForm(); if (f != null) { f.Owner = null; }
i'm sure this will come back to haunt me somehow. I've also played around with showing the real form caption and removing the floating panel caption so it looks like a real window. Goofy stuff like this:
f.FormBorderStyle = FormBorderStyle.Sizable; f.ControlBox = true; f.MaximizeBox = true; f.MinimizeBox = true; f.SizeGripStyle = SizeGripStyle.Show; DockMananger.SetCaptionVisible(this, false);
I wouldn't recommend trying to go down this road. You might run into other problems in the future. Also, your users might find it difficult to find floating panes if they are behind the main form because they do not show in the task bar. That being said, it would be easier to modify the Form hosting the floating panes by using a derived UltraDockManager and overriding InitializeFloatingWindowContainer (this method was only added to versions 8.1 and later in a recent hotfix, so if it is not available, you will have to download the latest hotfix). The floating window is passed into the method.
Hi Mike,
Once a pane is floated is there a way to prevent other panes from being docked to it?
I believe you can do this with the BeforeDockChange event. It will be fired as you drag a pane over other panes. You can put code in there to see which dock area the new pane is being dragged to. If the dock area contains this floated pane, you can set e.Cancel to True.