Could the `screenWidth` and `screenHeight` fields be exposed?
See original GitHub issueMy use case involves resizing a window to a fraction of the current screen’s dimensions. To this end, It would be nice to have the screenWidth
and screenHeight
fields exposed from the screen
API.
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
How can an html element fill out 100% of the remaining ...
This is the simplest answer, as you don't need to set the height of all the parent elements to 100%. Here's the current...
Read more >[Chapter 42] 42.6 Screen Size Testing Files
42.6 Screen Size Testing Files. How many lines and columns are there on your screen or window? The answer can be important to...
Read more >Screen.width and Screen.height wrong for iPad in IDE?
I've got an iPhone project in U3.0 and the game tab screen is set to iPad resolution (1024x768). When I read Screen.width and...
Read more >Screen.width - Web APIs - MDN Web Docs - Mozilla
The Screen.width read-only property returns the width of the screen in CSS pixels.
Read more >Chapter 2: Video Flashcards | Chegg.com
The closest viewer should be no closer than 1 times the screen width. If the nearest viewers are located too close to the...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
SysGet functionality would be perfect!
Additionally, getting a handle to the active monitor like in @idbrii’s case seems to be a really common use case which is not easy to implement. Having an API call specifically for that would be amazing, but I’m not sure if that’s within the scope of this library.
A_ScreenWidth/Height gives you the dimensions of the primary monitor, but to get other monitors or the entire desktop (spanning monitors), you need to use SysGet. SysGet covers more use cases, so it’d be preferable to me!
In my AutoHotkey scripts, I use SysGet to find the active monitor, position windows at edges of monitors, and change layout based on the number of monitors and which is primary. (So I use Monitor MonitorCount MonitorPrimary and MonitorWorkArea.)