C#Winforms,没有使用GrowAndShrink调整大小箭头

Jac*_*ack 5 c# visual-studio-2010 winforms

我有一个带有图片框,按钮和menustrip的winform.图片框固定在所有方面,因此当我调整表单大小时,图片框也会调整大小.我将表单设置为最小大小为700x600.

但这仅在表单设置为AutoSizeMode = GrowOnly时有效.如果我更改为AutoSizeMode = GrowAndShrink,则对角线<=>调整大小箭头甚至不显示.

如果我在表单上设置SizeGripStyle = Show,我可以让箭头显示并"调整大小"但是当我拖动它以调整大小时,它只是闪烁得非常快并且回到默认大小.

我怎样才能使GrowAndShrink而不仅仅是GrowOnly呢?

Val*_*mas 6

确保表单属性具有以下内容:

AutoSize: false (sounds like it should be true, but set this to false).
AutoSizeMode: GrowOnly (like above, sounds like it should be GrowAndShrink)
MinimumSize: Not important. set to 1, 1 for now. Is just to stop resizing getting too small.
MaximumSize: Not important. set to 1, 1. As above (MinimumSize).
SizeGripStyle: Not important. Set to Show. 
Run Code Online (Sandbox Code Playgroud)

最后,确保在窗体调整大小时使用锚定或对接来调整控件宽度.使用宽度设置控件可能会阻止您调整窗体大小.