Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can't resize the form by dragging its borders

Tags:

c#

winforms

Form's AutoSize: False. Form's AutoSizeMode: Grow and Shrink.

Issue: I cant resize my form by dragging its borders, I can only do that by dragging that grip thing on the bottom right side of the form.

Is there any other property on the form that I sohlud change to fix this problem?

Here is also a screen shot of the hierarchy of controls on the form...maybe setting on lower level controls on the form is causing this?

enter image description here

like image 379
Bohn Avatar asked Sep 05 '12 18:09

Bohn


2 Answers

Because this is not in the answers, I'll write this here.

The problem seems to be caused by the form's AutoSizeMode being on GrowAndShrink, and not GrowOnly, which is the default setting. Resetting to GrowOnly fixed the issue.

(confirmed on MSVS2013 with .net 4.5 on Win7)

like image 175
dare0021 Avatar answered Oct 25 '22 01:10

dare0021


Make sure the FormBorderStyle is set to Sizable, and that the SizeGripStyle property is set to Auto or Hide.

like image 21
KeithS Avatar answered Oct 25 '22 02:10

KeithS