c# - 设置窗口高度大于屏幕高度

标签 c# windows console-application

有谁知道是否真的可以使用 C# 设置窗口的高度,使其大于屏幕尺寸?

我在几个窗口上尝试过这样的事情:

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

但是,它们永远不会超过屏幕尺寸 - 有解决办法吗?

最佳答案

不,虽然您正在使用 SetWindowPos MSDN 文档,但在 Form.Size 上是不允许的属性(property)说:

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).

关于c# - 设置窗口高度大于屏幕高度,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8656200/

相关文章:

c# - EF 4.0 - 加载导航属性的导航属性

c# - 编辑器中的全屏模式游戏 View

c# - MVC5/EF/LINQ - 多个选择计数查询返回到 View ,最佳实践

python - 为什么默认情况下 Python 没有安装在 Windows 上?

c++ - do...while 语句满足后向控制台输出一个值?

c# - 防止 Resharper "Possible Null Reference Exception"警告

c++ - 检查文件大小而不用 C++ 打开文件?

python - Kivy错误: [CRITICAL] [App ] Unable to get a Window,中止

.net - 如何在 C# 中使用操作动词进行命令行解析?

c# - 如何在 C# 控制台应用程序中禁用用户输入?