Hi
Child forms in a project do not display the size set at design time.
Any reason why this should happen?
regards
dandy
Hi
Child forms in a project do not display the size set at design time.
Any reason why this should happen?
regards
dandy
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.
write at code window of child form something likeCode:Public Sub Form_Load() frmchild.width = 8160 'according to your need frmchild.Height = 5970 'according to your need frmchild.Show End Sub
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.
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
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.
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