MDI Form controls

  • Thread starter Thread starter neeraj
  • Start date Start date
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?
 
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
 
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.
 
Back
Top