Results 1 to 6 of 6

Thread: [RESOLVED] Form is resizable when it shouldn't be

  1. #1

    Thread Starter
    PowerPoster gavio's Avatar
    Join Date
    Feb 2006
    Location
    GMT+1
    Posts
    4,462

    Resolved [RESOLVED] Form is resizable when it shouldn't be

    I have a FixedSingle Form (I actually wan't to simulate the MessageBox). Only if i disable the ControlBox property the Form can be resized.

    I have tried VB6 also (just for comparison), where everything is "OK" (as I expected it to work for me).

    Could this be a bug? It's a 2.0 framework btw.


  2. #2
    PowerPoster cicatrix's Avatar
    Join Date
    Dec 2009
    Location
    Moscow, Russia
    Posts
    3,654

    Re: Form is resizable when it shouldn't be

    This code makes the form non-resizable for me (VS 2010):

    Code:
    Me.FormBorderStyle = Windows.Forms.FormBorderStyle.FixedSingle
    Me.ControlBox = False
    Just checked on VS 2008 - the same, everything works fine.

  3. #3
    Fanatic Member Satal Keto's Avatar
    Join Date
    Dec 2005
    Location
    Me.Location
    Posts
    518

    Re: Form is resizable when it shouldn't be

    I just tried this out using VS2008 with the 3.5 Framework and while I can't resize the form under the same sort of settings, I can maximise it by double clicking on the header which I wouldn't have thought would have been appropriate.

    A quick work around might be to set the MinimumSize and MaximumSize to the same size as you want your form.

    I hope that this helps

    Satal

  4. #4
    PowerPoster cicatrix's Avatar
    Join Date
    Dec 2009
    Location
    Moscow, Russia
    Posts
    3,654

    Re: Form is resizable when it shouldn't be

    Add this then (maximizing / minimizing is not resizing in terms of Windows message pump):

    Code:
    Me.MaximizeBox = False
    Me.MinimizeBox = False

  5. #5

  6. #6

    Thread Starter
    PowerPoster gavio's Avatar
    Join Date
    Feb 2006
    Location
    GMT+1
    Posts
    4,462

    Re: Form is resizable when it shouldn't be

    Found the problem. It is actually in my skin

    Thank you anyways

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