|
-
Jul 21st, 2001, 04:18 PM
#1
Thread Starter
Frenzied Member
aligning an mdichild?
I have an mdiform with childs. I know that the align property can (and has to be) set when placing controls directly on the mdiform. I made at startup two pictureboxes combine into one L-shaped picturebox in order to accomadate a control so it looks good. That all worked fine, but because of the L-shape, it pushes the mdichild off the screen! I could fix this if I made the mdichild align to the right, but how do I do that? There isn't a frmChild.align property.
retired member. Thanks for everything 
-
Jul 23rd, 2001, 01:20 AM
#2
Lively Member
Not sure if this will work (i'm not near a design environment), but I think that an MDI child form has a .left property. If so then use this code to align it to the right of a MDI form
Private Sub AlignChildFormRight(vChildForm as form)
vChildForm.left=MDIForm.Width-vChildForm.width-100
End Sub
This should align to the right, although you may have to change the 100 at the end to get rid of scroll bars if you don't want them
Cheers
Chris
-
Jul 23rd, 2001, 04:09 AM
#3
PowerPoster
Hi
There are a few ways to handle this problem.
1) You could set the child form's WindowState property to Maximized; OR
2) You could resize the child form as required.
VB Code:
'Code within the MDI form (eg command button etc)
frmChild.Move 0, 0, Me.ScaleWidth, Me.ScaleHeight
frmChild.Show
Regards
Stuart
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
|