Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Maximise, resize and the status bar

Status
Not open for further replies.

wsobers

IS-IT--Management
Dec 2, 2000
43
BB
My app consists of a top level form and (ShowWindow=2) and I can create child forms with no problem.
Question 1: when does the resize event fire? After the form has been resized, or at the start of the form resize?
Question 2: A mximized child form takes up the entire parent form area, unless, there is a toolbar on the form. What this does is cover up any status bar there might be on the parent form.
Has anyone come up with a way to deal with this?

Wayne
 
Wayne,
1) After it's been resized. Check it out by just putting a wait window in the Resize method like :
Code:
WAIT WINDOW transform(thisform.width)+" x "+transform(thisform.height) NOWAIT
2) Put some code in the Resize event to limit the maxed size. e.g.
Code:
IF thisform.height > 450
   thisform.height = 450
ENDIF
Rick
 
I've done the first test and I realised what was happening.
I had two tool bars, One docked at the botton of the screen and one docked to the left. I would set a text box in the bottom tool bar to thisform.width in the resize, however the text box would always be smaller that the full form width. I realised that it did not include with width of the docked toolbar on the left. so that is solved.
On item number 2, setting max height still won't work if the child screen is maximized. It seems that it will only respect the toolbar and nothing else.

Wayne
 
Wayne,
I know that #2 works, the only question is what value to set the value to. If you know the size of the parent window and that the toolbars are as you have stated, then you'd just need to set the child form's maximum values to accomodate those parameters.

Rick
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top