CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 7 of 7

Thread: c# gui scaling

  1. #1
    Join Date
    Aug 2009
    Posts
    7

    c# gui scaling

    Hi,

    I'm new to C# and I am currently making some sales tracking system. I have a big problem with its user interface.

    You see, I have this Form and I put controls in it, specifically a TabControl.
    My Form's size is at 1024x768. My TabControl's size is near the Form's width but leaving margins on both sides. Its height doesn't matter at the moment. Now, when I run my program it shows up a 1024x768 user interface, looking clean and good. When I maximize it, the User interface maximizes but the TabControl remains the same thus making a bigger margin on the right side.

    I have read about scaling and but It isn't clear to me.

    Please help. =)

  2. #2
    Join Date
    Jun 2008
    Posts
    2,477

    Re: c# gui scaling

    Use the Dock and Anchor properties. If you want the tab control to resize horizontally and from the bottom down, set the anchor to left, right, bottom.

  3. #3
    Join Date
    Jun 2001
    Location
    Melbourne/Aus (C# .Net 4.0)
    Posts
    686

    Re: c# gui scaling

    The other alternative is... Design your App for a certain size and remove the Maximise button. Eg: Windows Calculator.
    Rob
    -
    Ohhhhh.... Old McDonald was dyslexic, E O I O EEEEEEEEEE.......

  4. #4
    Join Date
    Jun 2008
    Posts
    2,477

    Re: c# gui scaling

    Quote Originally Posted by rliq View Post
    The other alternative is... Design your App for a certain size and remove the Maximise button. Eg: Windows Calculator.
    That is a very lazy solution...

    If it makes sense to resize the window, users should be able to.

  5. #5
    Join Date
    Jun 2001
    Location
    Melbourne/Aus (C# .Net 4.0)
    Posts
    686

    Re: c# gui scaling

    I agree, but it is not always applicable to all applications.
    Rob
    -
    Ohhhhh.... Old McDonald was dyslexic, E O I O EEEEEEEEEE.......

  6. #6
    Join Date
    Jun 2008
    Posts
    2,477

    Re: c# gui scaling

    That's true. Many of the manufacturing utilities that I write do not have sizable dialogs.

  7. #7
    Join Date
    Aug 2009
    Posts
    7

    Re: c# gui scaling

    Cheers to BigEd781 and everyone.

    Anchoring is pretty flexible. =)

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

Featured