MDI Form controls

N

neeraj

Hi, people!
I'm trying to add a picturebox to a parent mdi form to serve as an
image background image on the center of the initial form. However, the
picturebox appears in front of every child form. How can I make the
picturebox go to the back so that the child forms show before it?
 
R

R. MacDonald

Hello, neeraj,

You need to put it on the MDIClient. I don't know if there is an easier
way to find this, but in the past I have iterated through the controls
on the MDI form (comparing the TypeOf each to MdiCLient) to find it.
Then I maintained a reference to this for subsequent use.

Cheers,
Randy
 
C

CMM

Based on my own experience, Randy's suggestion is the only way to go about
it.
The background area of an MDI mother window is really just a control.
Find the mdiclient control set a module level variable WithEvents to it, and
paint the image on the control in the control's paint event.

If you'd like sample code, I can post it, but you should be able to figure
it out.
 

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