Home All Groups Group Topic Archive Search About
Author
15 May 2006 2:10 PM
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?

Author
16 May 2006 6:32 AM
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


neeraj wrote:

Show quoteHide quote
> 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?
>
Author
16 May 2006 2:03 PM
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.

--
-C. Moya
www.cmoya.com
Show quoteHide quote
"R. MacDonald" <sci***@NO-SP-AMcips.ca> wrote in message
news:446971af$0$36598$dbd4b001@news.wanadoo.nl...
> 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
>
>
> neeraj wrote:
>
>> 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?
>>