Results 1 to 4 of 4

Thread: Resizing MDI forms

  1. #1

    Thread Starter
    New Member
    Join Date
    Feb 2002
    Location
    Cardiff, UK
    Posts
    6

    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!'

  2. #2
    Addicted Member
    Join Date
    Apr 2000
    Location
    England
    Posts
    246
    haveyou correctly set the scale mode? and what is teh EXACT error,
    Some Days, i just get this feeling that i'm helping to write dozens of Viruses...

  3. #3
    Hyperactive Member
    Join Date
    Jun 1999
    Location
    ma,usa
    Posts
    485
    You resized it but won't see it if you don't show it: frmTip.show

  4. #4

    Thread Starter
    New Member
    Join Date
    Feb 2002
    Location
    Cardiff, UK
    Posts
    6
    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width