MDI - help w/image background

G

Guest

I have a MDI app and I want to have a image in the client area. I can't use
the Picture control because it hides the MDIchild Forms. I tried to send the
Picture control to the back after I display the child form, but it
disappears. Even when I use just the image background the image dose not
display.

Can anyone help me with this? Thanks.....
 
W

Wiktor Zychla [MVP]

I have a MDI app and I want to have a image in the client area. I can't
use
the Picture control because it hides the MDIchild Forms. I tried to send
the
Picture control to the back after I display the child form, but it
disappears. Even when I use just the image background the image dose not
display.

Can anyone help me with this? Thanks.....

void PaintMDIBackground( object sender, PaintEventArgs e )
{
// draw the background image here using e.Graphics
...
}

and somewhere
foreach ( Control c in mdiParent.Controls )
if ( c is MdiClient )
((MdiClient).c).Paint += new PaintEventHandler( PaintMDIBackground );

Wiktor Zychla
 

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