简体   繁体   中英

How would I set the window size to windowed fullscreen?

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.

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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