简体   繁体   English

将窗口高度设置为大于屏幕高度

[英]Set window height to be larger than screen height

Does anyone know if its actually possible to set the height of a window such that it is greater than the screen size using C#? 有谁知道实际上是否可以使用C#将窗口的高度设置为大于屏幕尺寸?

I tried something like this on several windows: 我在几个窗口上尝试过这样的事情:

SetWindowPos(handle, new IntPtr(0), 0, 0, 1024, 4000, 
             SetWindowPosFlags.SWP_SHOWWINDOW);

However, they never go past the screen size - is there a way around this? 但是,它们永远不会超过屏幕尺寸-有没有解决的办法?

No its not allowed though you are using SetWindowPos the MSDN docs on Form.Size property says: 尽管您正在使用SetWindowPos ,但Form.Size属性上的MSDN文档说:

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). 在每个屏幕尺寸(水平+ 12和垂直+ 12)上,该值不能大于12个像素。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM