Visual Basci form size changed!

Havooma 156 Reputation points

So I was working on a VB project which uses Windows forms. I wrote some code, did some tinkering, all is OK.

I then unplugged the second screen I was using with my laptop and ran the code again. The form has now resized and I have a TabPage on the form which is now massive and extends way to the right of the form.

Ive tried extending the size of the form to the right to try and find the edge of the TabPage but I cannot extend the size beyond 1940. The TabPage is currently 3930 wide.

I tried reducing the size of the TabPage as well but it would not let me go less than 3930.

Can anyone help:

1) to recover the form to what it was just now!
2) Explain why this happened - it may or may not be due to unplugging the monitor from the laptop, seemed to happen at the same time though.
3) Suggest a way of it not happening again!

Many thanks

An object-oriented programming language developed by Microsoft that is implemented on the .NET Framework. Previously known as Visual Basic .NET.
2,507 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Jiachen Li-MSFT 24,511 Reputation points Microsoft Vendor

    Hi @Havooma ,

    • The size of the TabPage is based on the size of the TabControl.
    • Maybe because your second screen is 4K resolution, after designing on it, back to 1920*1080 laptop still retains the size based on 4K design.
    • Try modifying the size of the TabControl.

    Best Regards.
    Jiachen Li


    If the answer is helpful, please click "Accept Answer" and upvote it.
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    1 person found this answer helpful.
    0 comments No comments