Results 1 to 6 of 6

Thread: Disallowing the user to resize the form in runtime

  1. #1

    Thread Starter
    Addicted Member SidCMC's Avatar
    Join Date
    Jan 2008
    Location
    Mumbai, India
    Posts
    166

    Disallowing the user to resize the form in runtime

    Hi Friends,
    I have a windows form.
    I dont want the user to be allowed
    to maximize or resize the form.
    How do I go about doing this?
    Regards,
    Sid.
    THE BEST WAY TO THANK A HELPFUL POST IS TO RATE IT!!!!
    Take up one idea. Make that one idea your life - think of it, dream of it, live on that idea. Let the brain, muscles, nerves, every part of your body, be full of that idea, and just leave every other idea alone.

  2. #2
    Pro Grammar chris128's Avatar
    Join Date
    Jun 2007
    Location
    England
    Posts
    7,604

    Re: Disallowing the user to resize the form in runtime

    You can set the FormBorderStyle property to FixedSingle and you can set the MaximizeBox property to False.
    Its usually worth just looking through the available properties for controls/forms in the designer first as you will often see what you are looking for (as most of the properties have fairly intuitive names)
    My free .NET Windows API library (Version 2.2 Released 12/06/2011)

    Blog: cjwdev.wordpress.com
    Web: www.cjwdev.co.uk


  3. #3

    Thread Starter
    Addicted Member SidCMC's Avatar
    Join Date
    Jan 2008
    Location
    Mumbai, India
    Posts
    166

    Re: Disallowing the user to resize the form in runtime

    Hi Chris,
    Setting the maximizebox property to false would
    only hide the maximize option on the top-right corner
    of the form. However the user can resize the form with
    the help of the mouse.
    I dont want that to happen either.
    Regards,
    Sid.
    THE BEST WAY TO THANK A HELPFUL POST IS TO RATE IT!!!!
    Take up one idea. Make that one idea your life - think of it, dream of it, live on that idea. Let the brain, muscles, nerves, every part of your body, be full of that idea, and just leave every other idea alone.

  4. #4
    Pro Grammar chris128's Avatar
    Join Date
    Jun 2007
    Location
    England
    Posts
    7,604

    Re: Disallowing the user to resize the form in runtime

    which is exactly why I said change the FormBorderStyle property as well
    My free .NET Windows API library (Version 2.2 Released 12/06/2011)

    Blog: cjwdev.wordpress.com
    Web: www.cjwdev.co.uk


  5. #5

    Thread Starter
    Addicted Member SidCMC's Avatar
    Join Date
    Jan 2008
    Location
    Mumbai, India
    Posts
    166

    Re: Disallowing the user to resize the form in runtime

    Alright...this works.
    Thank you.
    THE BEST WAY TO THANK A HELPFUL POST IS TO RATE IT!!!!
    Take up one idea. Make that one idea your life - think of it, dream of it, live on that idea. Let the brain, muscles, nerves, every part of your body, be full of that idea, and just leave every other idea alone.

  6. #6
    Pro Grammar chris128's Avatar
    Join Date
    Jun 2007
    Location
    England
    Posts
    7,604

    Re: Disallowing the user to resize the form in runtime

    no problem make sure you remember to mark this thread as Resolved by using the Thread Tools menu at the top of your first post
    My free .NET Windows API library (Version 2.2 Released 12/06/2011)

    Blog: cjwdev.wordpress.com
    Web: www.cjwdev.co.uk


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