MDI BottomMost Child Window

R

rawCoder

Hi,

How can I have an MDI Child Window in such a way that all other MDI Child
Windows appear OVER it.
Its like a background window which will never overlap another MDI child
window.
Is this achieveable, this almost the BottomMost behaviour of an MDI Child
Window?
Is it possible to have this behaviour for multiple windows?

Please feel free to ask if there is any confusion.
Thanx
rawCoder
 
N

Nicholas Paldino [.NET/C# MVP]

rawCoder,

You can make a call to the SetWindowPos API method through the P/Invoke
layer. Once you do that, you can set the hwndInsertAfter parameter to the
HWND_BOTTOM value to indicate that the window should be the bottom-most
window.

You would then make this call when your window is activated (because
activating it brings it to the top). You can do this by overriding the
WndProc method and handling the WM_ACTIVATED event. You need to do this
instead of handling the Activated event because you need to be able to say
you processed the message (instead of letting the default message bring the
window to the front).

The thing is, you can't have more than one window be the bottom window,
so you will have to decide which windows should be on top of each other out
of all of the bottom-most windows.

Hope this helps.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top