我将如何将窗口大小设置为窗口的全屏?

发布于 2025-02-03 20:01:17 字数 259 浏览 3 评论 0原文

如何将窗口大小设置为“窗口全屏”?

我能做的最好的是:

surface.setLocation(0, 0);
surface.setSize(displayWidth, displayHeight);

但是,由于任务栏和setLocation(0,0)不适合它,因此不合适(0,0)左右)

我使用的是Windows 10处理4.0B2。我也不使用处理应用程序,而是使用核心罐子作为库。

How do I set the window size to "windowed fullscreen"?

The best I can do is:

surface.setLocation(0, 0);
surface.setSize(displayWidth, displayHeight);

however it doesn't fit because of the taskbar and setLocation(0, 0) doesn't set the position to exactly the top left corner (it is a little off to the right and bottom)

I am using Windows 10 with Processing 4.0b2. I am also not using the processing application, but using the core jar as a library.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

一片旧的回忆 2025-02-10 20:01:17

有一个 fullScreen() 您可以使用。

setup()中,只需用size;fullScreen();替换。

请查看参考其他用途的参考,例如:

  • 带有OpenGL P2D Renderer的全屏(FullScreen(P2D);
  • 全屏幕上的全屏幕(FullScreen(2);)只有
  • 跨越两个显示器的FullScsreen(FullScreen(Span);

There is a fullScreen() function you can use.

In setup() simply replace your size(); call with fullscreen();.

Check out the reference for other uses, for example:

  • fullscreen with the OpenGL P2D renderer (fullScreen(P2D);)
  • fullscreen on the 2nd monitor (fullScreen(2);) only
  • fullscsreen spanning two monitors (fullscreen(SPAN);)
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文