checking the microphone and webcam

Force Window Size for Standalone Build?

Window resolution

Setting window resolution and position whether it’s in-game or in desktop requires you to first get the user’s current screen resolution.

Detecting screen resolution

Users have two relevant resolutions to consider:

"Screen resolution", which is the operating system’s default desktop resolution, and "game resolution" which is the resolution in which they play their game and can be different from the desktop setting.

Logical resolution

The GameInfo object sent by the getRunningGameInfo() function has, in addition to the expected width and height fields, two more properties called logicalWidth and logicalHeight. These fields return the game’s reported logical pixel dimensions. If your screen is scaled by a DPI factor, you should work with logical sizes, as the regular sizes will wound up being scaled in proportion, while the logical is not DPI aware.

Detecting resolution changes

In order to detect whether a user has changed their resolution:

  • In-game resolution change – Register to the overwolf.games.onGameInfoUpdated() event to get updated in-game resolution.

  • Desktop /out-of-game resolution change – There’s no way to detect a change in desktop resolution, you’ll have to check each time your app launches by using getMonitorsList().


Custom resize in Windows

When the upper-right section of the window looks like mouse cursor, your window is now in "resize mode," meaning you can use the mouse cursor to make the window any size you want. To do so, move the cursor to any edge or corner of the window until a double-headed arrow appears. When this arrow appears, click-and-drag to make the window larger or smaller. If this double-headed arrow does not appear, the window cannot be resized.

The animation below shows a double-headed arrow on the bottom, left, and corner of a window and how it resizes a window. To make the window horizontally bigger, move the cursor to the left or right edge of the window until it changes to the double-headed arrow. To make the window vertically bigger, do the same thing at the top or bottom of the window. To resize horizontally and vertically at the same time, use one of the corners of the window.

Post navigation

Previous Previous post: Vivaldi got bookmark icons and multiple instance support

Next Next post: How to move a window using keyboard only in Windows 10 and other versions

How to resize a window using Windows menus

A window can be resized using a series of keyboard shortcuts. Below are the steps for resizing a window only using the keyboard.

  1. Press Alt+Spacebar to open the window’s menu.
  2. If the window is maximized, arrow down to Restore and press Enter.
  3. Press Alt+Spacebar again to open the window menu, arrow down to Size, and press Enter.
  4. Press the up or down arrow key if you want to resize the window vertically or the left or right arrow key if you want to resize horizontally.
  5. Once an arrow key is pressed, you can press the same or opposite arrow key to continue resizing the window.

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio.LoginCreate account