Results 1 to 12 of 12
  1. #1
    Star Lounger
    Join Date
    Aug 2001
    Location
    GA
    Posts
    52
    Thanks
    0
    Thanked 0 Times in 0 Posts

    How 2 resize forms (VB5)

    I'm a wiz at Access97 but brand new to VB5. In VB5 I've created some forms and set the form's size during design. But when I run the program some forms open bigger than what I set them to, and others are smaller. While running the program, even if I resize the form and then close it and reopen it, it goes back to the arbitrary larger/smaller size. I must be missing something obvious?!?!?!? Why won't my forms open to the size i set them to????

  2. #2
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: How 2 resize forms (VB5)

    You're using the handles to resize the form itself, right? Not just resizing the window? do you have code that changes the Scale settings?
    Charlotte

  3. #3
    Star Lounger
    Join Date
    Aug 2001
    Location
    GA
    Posts
    52
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: How 2 resize forms (VB5)

    Hey charlotte,
    Yep, I'm using the form's handles to size the form. And there is no code related to changing height/width or scaleheight/scalewidth. And the scaleMode is set to Twip. Even if I add an empty form with no controls or code, the form doesn't open to the size I set it to in design mode. Is it possible that Windows2000 OS isn't playing nice with vb5???
    Later,
    Bruce

  4. #4
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: How 2 resize forms (VB5)

    Well, I'm running VB6 on Win2000 without any problems, but I never tried VB5 on it. I can't remember if there were service packs for VB5, but I imagine there were. Do you have any installed?
    Charlotte

  5. #5
    Bronze Lounger
    Join Date
    Jun 2001
    Location
    New York, New York, Lebanon
    Posts
    1,449
    Thanks
    1
    Thanked 1 Time in 1 Post

    Re: How 2 resize forms (VB5)

    <img src=/S/hello.gif border=0 alt=hello width=25 height=29> charlotte

    If you don't mind me jumping into this thread, I was searching for a way to resize the APPLICATION window of MS-Excel so that the size of the application window will not change and the user can't change it either.

    By the Application Window, I mean the Window that Windows NT/2000/XP gives to MS-Excel to work within. NOT the workbook window that MS-Excel opens for each workbook. This is why I came to the VB lounge because it has to be some sort of an API

    Any ideas?

    Wassim <img src=/S/compute.gif border=0 alt=compute width=40 height=20>
    <img src=/S/compute.gif border=0 alt=compute width=40 height=20> in the <img src=/S/bagged.gif border=0 alt=bagged width=22 height=22>

  6. #6
    Silver Lounger
    Join Date
    Mar 2001
    Location
    Springfield, Ohio, USA
    Posts
    2,136
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: How 2 resize forms (VB5)

    <img src=/w3timages/blackline.gif width=33% height=2>
    > In VB5 I've created some forms
    <img src=/w3timages/blackline.gif width=33% height=2>

    I think that you used the Application Wizard to create these forms. If I remember correctly, in your project, you will see some code that has GetSettings and other that has SaveSettings. This stashes what VB thinks is a good size in the Registry. If you comment ou this code, you will have less trouble. (Note, the VB6 wizard leaves this stuff out, and VB6 also handles database stuff better, so you might want to upgrade.) HTH --Sam
    <font face="Comic Sans MS">Sam Barrett, CACI </font face=comic>
    <small>And the things that you have heard... commit these to faithful men who will be able to teach others also. 2 Timothy 2:2</small>

  7. #7
    Gold Lounger
    Join Date
    Dec 2000
    Location
    New Hampshire, USA
    Posts
    3,386
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: How 2 resize forms (VB5)

    Get a hold of Ken Getz's Access books and VBA DEveloper Handbook. He describes how to scale things.

    I believe the topic is also covered in Gary Cornel's Visual Basic 6 from the Ground Up.

  8. #8
    Platinum Lounger
    Join Date
    Feb 2001
    Location
    Yilgarn region of Toronto, Ontario
    Posts
    5,453
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: How 2 resize forms (VB5)

    G'die Bruce!

    If it's any use, I've got chunks of code, somewhere, that adjust the size of my Word97/VBA GUI forms during execution. They actually calculate how big they should be (based on the number of fields in a table, for example, allowing so much vertical space per item) and set the size.

    I have other chunks that allow the user to resize all elements on a form at once by clicking on directional arrows ("I need the LH listbox to be much smaller and the RH listbox to be much bigger").

    Let me know if this might help.

    I understand that you feel the problem is occurring sometime between your hand at design and the system running your forms.

  9. #9
    Gold Lounger
    Join Date
    Dec 2000
    Location
    New Hampshire, USA
    Posts
    3,386
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: How 2 resize forms (VB5)

    That's not the right solution.
    Solution has to be based on screen resolution.

    See the references I mentioned.

  10. #10
    Star Lounger
    Join Date
    Aug 2001
    Location
    GA
    Posts
    52
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: How 2 resize forms (VB5)

    Well since first posting this message I come to find that the problem is not limited to the forms in the app I am creating. Seems I have this form sizing problem in other applications. This leads me to believe it is an OS problem and not specific to my VB5 development stuff. It is not consistent but when using other applications (like outlook, word, symantic anivirus, etc) the form window is not open to the size of the form. (makes for an interesting guessing game as to what buttons are at the bottom of the form as I randomly tab and Enter)

    Just to clarify, I do not want to SCALE the form and/or it's controls. The problem is specific to the window size when the form opens. It is not opening to the size that I set the form to.
    But as I said, I now think this is a OS problem not in VB. I am using windows 2000.

    Any budy seen anything like this. The last app that was affected with this improper size windowing was when I installed Norton Tools. Many of the install wizard's forms would not display their full size (and being a modal/dialog form mean I am stuck with no way to open the window larger.
    Also happens when clicking New mail message in outlook. The new message window opens very small (but at least this window isn't modal/dialog and I can drag it open).

    <bruce closing his eyes>
    "Microsoft is my friend....Microsoft is my friend.....Microsoft is my friend"
    aaaahhhhhh.....

  11. #11
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: How 2 resize forms (VB5)

    Do you just want to maximize the form or did you have something else in mind? You can maximize the form *and* the application window by using the WindowState property of the form and setting it to Maximize. If you set the WindowState property to Normal, the form should open at whatever size you created it. Are you already doing that?
    Charlotte

  12. #12
    Star Lounger
    Join Date
    Aug 2001
    Location
    GA
    Posts
    52
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: How 2 resize forms (VB5)

    Yep, the window is set to normal but the window size is not the size of the form. It opens at some odd size much smaller than what the form is set at. This is happening with all the forms in my project and like I said before, this odd "window sizing" occures in other applications too.
    It's very strange.

    Thanks!
    Bruce

Posting Permissions

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