Results 1 to 4 of 4

Thread: Form resizing between laptop and desktop

  1. #1

    Thread Starter
    New Member
    Join Date
    Feb 2004
    Posts
    5

    Form resizing between laptop and desktop

    I'm having a problem with my form and controls resizing and repositioning when I move my VB.NET app. from my desktop to a laptop. I've developed the app. on my desktop at a screen resolution of 1024 x 768. When I set my laptop screen resolution to 1024 x 768 to match the desktop, the form and all controls are resized and everything doesn't fit on the screen. For example, the form size is set to 1024 x 768 on the desktop, but resizes to 1308 x 945 on the laptop--but I have no idea why!
    I can understand why something like this could happen if the screen resolutions of the two computers were different, but they're not. Obviously I don't want to have to resize and reposition everything whenever I move from the desktop to my laptop.

    I know I'm missing something here--this is my first VB.NET project too so I'm a beginner. Anybody have any idea what I need to do to fix this? Any ideas much appreciated.

  2. #2
    PowerPoster hellswraith's Avatar
    Join Date
    Jul 2002
    Location
    Washington St.
    Posts
    2,464
    You probably should look at the anchor properties of the controls. This allows the form to be moved around and the controls resize with it.

    Just open a new project, put a couple controls on the form, then set up the anchor properties to different settngs to view how they work. Once you get a handle on them, you shouldn't have a problem anymore.

  3. #3
    Fanatic Member pax's Avatar
    Join Date
    Mar 2001
    Location
    Denmark
    Posts
    840
    Hi.

    Perhaps you have system fontsize set to large on the laptop. That could cause the app. to be scaled.
    I wish I could think of something witty to put in my sig...

    ...Currently using VS2013...

  4. #4

    Thread Starter
    New Member
    Join Date
    Feb 2004
    Posts
    5
    Pax--That solved it! The fontsize on the laptop was set to scale up as the screen resolution increased, which caused my form and controls to scale up also. I set the fontsize to normal and the app. looks just like it does on the desktop. Thanks for the suggestion!

    Hellswraith--thanks for the tips about anchoring controls. I've played around with the anchors and this will help when I switch to higher resolutions and resize forms.

    Thanks again to both of you!

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