3

I tried to set form height to 2000 but it return height size to 1044 in C# winform.
Is any way to make height size more than 1044 in winform C#?

Kurubaran
  • 8,696
  • 5
  • 43
  • 65
user3713495
  • 29
  • 1
  • 6
  • what's the value of form's `MaxHeight` property? – alex.b Jun 20 '14 at 06:38
  • How are you setting the height? – Sayse Jun 20 '14 at 06:39
  • How tall is your screen? – ClickRick Jun 20 '14 at 06:51
  • What happens if you change resolution, either smaller or larger? – ClickRick Jun 20 '14 at 06:54
  • ClickRick, I'd imagine absolutely nothing different. OP - How are you setting the height? programatically? designer? if the former, show your code. if the latter, does the designer window display the changes? – Sayse Jun 20 '14 at 07:05
  • @Sayse My screen is 1080 tall, and Designer restricts a form to 1100. Alternatively, if I run any program (e.g. Notepad), and move the window towards the bottom of the screen, I can then resize it vertically but again limited to 1100. – ClickRick Jun 20 '14 at 07:10
  • @user3713495 I wonder why you have to set the form's height to more than your monitor's display height. It's not going to be user friendly. – Kurubaran Jun 20 '14 at 07:13
  • As it turns out - This question is a [duplicate](http://stackoverflow.com/q/6651115/1324033).... But then I don't understand why you'd ever want to design a form that has a height greater than the majority of monitor resolutions – Sayse Jun 20 '14 at 07:15
  • @user3713495 The question about what you're trying to achieve is a good one. There might be other solutions to your underlying problem so you'd have to explain your reason for wanting to do this, probably as a new question. – ClickRick Jun 20 '14 at 08:30

1 Answers1

5

The answer is basically no, though Is the size of a Form in Visual Studio designer limited to screen resolution? has a workaround for some situations.

As explained in that Q&A, this is intentional and by design:

From the MSDN

Property Form.Size: The maximum value of this property is limited by the resolution of the screen on which the form runs. The value cannot be greater than 12 pixels over each screen dimension (horizontal + 12 and vertical + 12).

Community
  • 1
  • 1
ClickRick
  • 1,553
  • 2
  • 17
  • 37