C# 根据显示分辨率调整窗口大小
我是 .Net 编程的新手,所以请耐心等待;-)。
我在调整窗口大小时遇到问题。我想从我的应用程序调整其他应用程序窗口的大小并截取它的屏幕截图。我根据以下示例调整大小: http://blogs. geekdojo.net/richard/archive/2003/09/24/181.aspx。但我有一个问题。我使用屏幕分辨率为 1024x640 像素的笔记本电脑,但我想将窗口大小调整为 1200x1600 像素。由于显示限制,我无法做到这一点。是否有任何棘手的解决方案来调整此分辨率的窗口大小并截取整个窗口的屏幕截图?我也尝试过这里建议的 Sdesk 程序女巫:创建比桌面大的窗口(显示分辨率)。有什么帮助吗?
I am total newbie in .Net programming so be patient, please ;-).
I have problem with resizing window. I want to resize from my app other app's window and take screenshot of it. I do resizing based on this example: http://blogs.geekdojo.net/richard/archive/2003/09/24/181.aspx. But I have a problem. I work on a laptop with 1024x640 pixels screen resolution but I want to resize my window to 1200x1600 px. I can't do that couse display limitations. Is there any tricky solution to resize window for this resolution and take a screenshot of whole window? I've alos tried Sdesk program witch is suggested here: Create Window larger than desktop (display resolution). Any help?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我建议你找到一种方法来设置大于物理分辨率的虚拟分辨率(基本上就是 sDesk 所做的),然后让你的应用程序在那个大桌面上正常运行。根据您的视频卡,您也许可以直接在视频驱动程序中配置虚拟分辨率,而无需使用任何其他实用程序。
I would suggest you find a way to set a virtual resolution larger than your physical resolution (basically what sDesk does), and then let your application run normally on that large desktop. Depending on your video card, you might be able to configure the virtual resolution directly in the video driver, without using any additional utility.
不,这是不可能的。事实上,您无法以任何方式将窗口大小调整为大于显示大小。
只需将正常模式(未最小化或最大化)的窗口放置在左侧某处即可尝试。抓住它的右边框并增加宽度直到屏幕的末尾。现在,通过抓住标题栏将窗口向左移动一些。重复此过程几次。到了某个时候,你就无法再把窗口拉得更宽了。如果您现在尝试移动窗口直到右边框碰到桌面的右侧,您将看到左边框直接位于桌面的左侧。
No it is not possible. In fact you can't resize in any way the windows greater then the display size.
Just try it by position a window in normal mode (not minimized or maximized) somewhere on the left. Grab the right border of it and increase the width till the end of your screen. Now move the window, by grabbing the title bar, some more to the left. Repeat this procedure several times. At some point you're not able to get the window any wider anymore. If you now try to move the window till the right border hits the right side of your desktop, you'll see that the left border is direct at the left desktop side.