|
-
Aug 22nd, 2012, 12:16 AM
#1
Thread Starter
Junior Member
[RESOLVED] MDI Form
Hi
Child forms in a project do not display the size set at design time.
Any reason why this should happen?
regards
dandy
-
Aug 22nd, 2012, 01:43 PM
#2
Re: MDI Form
Typical behaviour of a MDI child. If you want the form to be a specific size then you should add some code to the load event to size it the way you want.
-
Aug 23rd, 2012, 08:41 AM
#3
Frenzied Member
Re: MDI Form
write at code window of child form something like
Code:
Public Sub Form_Load()
frmchild.width = 8160 'according to your need
frmchild.Height = 5970 'according to your need
frmchild.Show
End Sub
-
Aug 23rd, 2012, 08:48 AM
#4
Re: MDI Form
you don't need a show method there. More likely the call to show has already been made and is what triggered the Load event.
-
Aug 23rd, 2012, 09:19 AM
#5
Frenzied Member
Re: MDI Form
Then i will suggest .write the code in Resize event .No need to show the form.
Code:
Private Sub Form_Resize()
Me.Height = 4525 'as per your need
ME.WIDTH=3214 'as per your need
End Sub
-
Aug 23rd, 2012, 11:25 AM
#6
Re: MDI Form
Do not place the code in the resize event unless you want to prevent the user from being able to resize the form.
Best to do it as I suggested and just set the size in the form load event. No need to add the line to show the form just code in the load to set the initial form size that you want. Typically I also include a call to a sub routine which will center the child within the parent window but this of course is optional.
-
Aug 29th, 2012, 11:10 PM
#7
Thread Starter
Junior Member
Re: MDI Form
Dear DataMiser, Firoz.raj,
Thanks a ton for throwing some light.
I was going nuts as the problems are intermittant.
Made necessary changes to code and it works fine.
Have a great day.!!!!
Dandy
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
|