-
Resizing MDI forms
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!'
-
haveyou correctly set the scale mode? and what is teh EXACT error,
-
You resized it but won't see it if you don't show it: frmTip.show
-
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