PDA

Click to See Complete Forum and Search --> : Resizing MDI forms


LeeGriffiths
Mar 13th, 2002, 07:30 AM
Anyone know why I can't resize an MDI Form.

Basically I want a Tip form which has to be an MDI form, so when I click the HIDE TIPS button the form gets small so that only the button to SHOW TIPS is shown, you get the idea.

Anyway this bit of code doesn't work.


frmTip.ScaleHeight = 100


It just looks at me daft, in that weird VB dumbness and says 'erm...what was that....resize something....don't understand!'

Nirces
Mar 13th, 2002, 07:32 AM
haveyou correctly set the scale mode? and what is teh EXACT error,

joey o.
Mar 13th, 2002, 12:14 PM
You resized it but won't see it if you don't show it: frmTip.show

LeeGriffiths
Mar 14th, 2002, 12:52 PM
Actually I just figured it.

If you say object.ScaleWidth = x

It's just way of making your own user scale, that isn't pixels, twips, points and so on. You can force the object to have a scale width of 2, even if it has 200 pixels, which means each unit of the scale width would be 100 pixels long.

So the solution is (where the scaleMode is twips):

twipsPerPixelX = 15
object.Width = 20 * twipsPerPixelX