|
-
May 17th, 2004, 10:56 PM
#1
Thread Starter
Member
Setting the Order
OK this is what i've got:
I have a MdiParent with a PictureBox in it and when I call a form from the main menu it shows up behing the picture box. How can i fix this?
Thanks in advance
Brad Nichols
-
May 18th, 2004, 04:15 AM
#2
have you tried
PictureBox1.SendToBack()
?
I don't live here any more.
-
May 18th, 2004, 10:16 PM
#3
Thread Starter
Member
That doesn't work on a MDIParent.
Any other suggestions?
Thanks
Brad Nichols
-
May 19th, 2004, 02:48 AM
#4
Hi.
You can't do that. Object placed directly on an MDIParent will always be in front of the MDIChildren.
Why do you want to do this anyway?
If you just want to display an image, you would have to find the MDIClient area of the main form. Then you can add a handler to the paint event, and draw the image yourself.
VB Code:
'Put this in form load
Dim o As Object
For Each o in Me.Controls
If TypeOf (o) Is MDIClient Then
AddHandler o.Paint,AddressOf MyPaintEvent
Exit For
End If
Next
'Create a sub like this
Private Sub MyPaintEvent(Byval sender As Object, Byval e as PaintEventArgs)
e.Graphics.DrawImage(MyImage,0,0)
End Sub
I hope this helps you. If not, sorry.
I wish I could think of something witty to put in my sig...
...Currently using VS2013...
-
May 19th, 2004, 07:27 PM
#5
Thread Starter
Member
The reason for doing this is that I am writing a program for a company and the MDIParent is what is going to be shown most of the time. So I need to find a way that I can place objects on the MDIParent and the child forms display in front of it.
Any help on this would be GREATLY appreciated.
Brad Nichols
-
May 20th, 2004, 02:49 AM
#6
Hi.
I'm really sorry, but I just don't believe that can be done. At least not without some heavy API coding.
I'm sorry I can't help you more.
Good Luck on your quest.
Please post the result, should you find it.
I wish I could think of something witty to put in my sig...
...Currently using VS2013...
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|