Hi.
I have a Main Page with a Navigation Bar on the left, a MenuBar on the top and a Desktop beneath it.
When I run a Window ShowDialog, all other open windows inside the Desktop have their access blocked, but I can still use the Menu and the Navigation bars. Would there be a Wisej way of locking the whole thing once a Dialog has been shown?
Thanks in advance.
Ivan
Floating windows are managed inside a window manager which is either the root or a Desktop. The Desktop can be a main desktop, basically like a page, or a child of a page. When it’s the child of a page everything at the same level is outside and independent from the desktop. It’s done by design.
You can place the NavBar inside the Desktop and it will dock on top of the taskbar the use Application.Desktop = new MyDesktop(); You can place any control on the desktop. Can even move them around setting Movable = true.
You can also attach to Application.EnterThreadModal and LeaveThreadModal. They are fired every time the app enters a modal thread state (be it a dialog or a messagebox). In the handlers you can decide what to do with the controls that are not part of the child desktop. For multiple modal levels you can keep a counter.
HTH
Hi Luca.
Thank you for the prompt reply.
Yep, I thought that would be the case and I would have to deal with Modal forms and set the outsiders properly. It won’t be a big deal, since I will do it all from a Base form, which will handle tasks like that for the whole application. I just wondered whether there would be a magic move from the framework for something like that.
Since I don’t want forms on top of the NavigationBar and MenuBar, I will keep my current design and follow your second advice.
Once again. thanks.
Ivan
Please login first to submit.
