MDI + ImageBox

hadinatayp

Well-known member
Joined
Feb 8, 2006
Messages
95
Programming Experience
Beginner
I have a Mdi parent form,

mdicontainer.jpg


then i add an imagebox set the dock=fill and fills in an image,
now the problem is, when i add a new mdi form on the parent form, i can't see my form

mdicontainer2.jpg


later i found out that the child form was behind the imagebox, so how to make a child form appears on (above) the imagebox, instead behind??
I have tried the bringToFront() method but it didn't work....

does anybody have solution for this?

thx
 
Here is a common solution to "MDI background image":
VB.NET:
[SIZE=2][COLOR=#0000ff]For [/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]Each[/COLOR][/SIZE][SIZE=2] ctrl [/SIZE][SIZE=2][COLOR=#0000ff]As[/COLOR][/SIZE][SIZE=2] Control [/SIZE][SIZE=2][COLOR=#0000ff]In [/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]Me[/COLOR][/SIZE][SIZE=2].Controls[/SIZE]
[SIZE=2][COLOR=#0000ff] If [/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]TypeOf[/COLOR][/SIZE][SIZE=2] ctrl [/SIZE][SIZE=2][COLOR=#0000ff]Is[/COLOR][/SIZE][SIZE=2] MdiClient [/SIZE][SIZE=2][COLOR=#0000ff]Then[/COLOR][/SIZE]
[SIZE=2]  ctrl.BackgroundImage = Image.FromFile([/SIZE][SIZE=2][COLOR=#800000]"x.jpg"[/COLOR][/SIZE][SIZE=2])[/SIZE]
[SIZE=2][COLOR=#0000ff]  Exit [/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]For[/COLOR][/SIZE]
[SIZE=2][COLOR=#0000ff] End [/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]If[/COLOR][/SIZE]
[SIZE=2][COLOR=#0000ff]Next[/COLOR][/SIZE]
 
Back
Top