将表单扩展到所有屏幕
问题很简单:有没有办法将单个表单扩展到所有连接的屏幕?
The question is simple: is there a way to expand a single form to all connected screens?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
问题很简单:有没有办法将单个表单扩展到所有连接的屏幕?
The question is simple: is there a way to expand a single form to all connected screens?
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
接受
或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
发布评论
评论(2)
不可以,除非您要使用相当低级的语言(例如 C)进行编码并获取对图形内存的访问权限。
一般来说,是操作系统为你执行布局,所以除非你有低级访问权限,或者有供应商发布的 API,否则我想这将是相当困难的。
No, unless you are going to code in a reasonably low-level language, such as C and grab access to graphics memory.
Generally it's the operating system that performs the layout for you, so unless you have low-level access, or API published by the vendor, it would be quite hard I guess.
是的,所有屏幕构成了一个巨大的虚拟表面,您可以在上面放置表单。您只需将表单的位置设置为该表面的左上角,并将其大小设置为该表面的大小。
您可以使用以下代码找到该表面的范围:
然后您可以适当调整表单的大小:
您可能还想禁用表单边框:
不过我注意到,当您显示表单时,它会弹出到 0 的位置,0,这意味着如果您有任何监视器位于该点的上方或左侧,它们将不会被覆盖。要解决此问题,您需要在表单显示后设置位置。
Yes, all of the screens make up a giant virtual surface upon which you can place your form. You need to merely set the form's location to the top-left of this surface and its size to the size of this surface.
You can find the extent of this surface with the following code:
Then you can size your form appropriately:
You may also want to disable form borders:
I have noticed though, that when you show your form it will pop back to a location of 0,0, which means that if you have any monitors positioned above or to the left of this point they will not be covered. To solve this you need to set the location after the form is shown.