Home
Blogs
Questions
Jobs
Monetize

Home

About Us

Blogs

Questions

Jobs

Monetize

Post Job

banner

Questions about screen-resolution

Read more about screen-resolution

python (12.9k questions)

javascript (9.2k questions)

reactjs (4.7k questions)

java (4.2k questions)

java (4.2k questions)

c# (3.5k questions)

c# (3.5k questions)

html (3.3k questions)

Questions - screen-resolution

How to get current monitor scale

I have tested my program on laptop, with standard ressolution, with view scale 125%. I have following code to get this scale factor: HWND activeWindow = ::GetActiveWindow(); HMONITOR monitor = Monito...
test-img

Michal Hadraba

c++

windows

screen-resolution

Votes: 0

Answers: 1

Latest Answer

It is quite magical. double scMon = 1.0; HWND activeWindow = ::GetActiveWindow(); HMONITOR monitor = MonitorFromWindow(activeWindow, MONITOR_DEFAULTTONEAREST); UINT x, y; if (SUCCEEDED(GetDpiForMonito...
test-img

273K

Can I supply image icons in Java in a higher resolution to avoid blurred icons after scaling?

I am designing a GUI with Java Swing and AWT (Java 8) and am struggling with the icons I use. I load a large PNG image and scale it to 18x18px and then use it in a button or label. It works well in al...
test-img

Philip Leifeld

java

swing

awt

screen-resolution

imageicon

Votes: 0

Answers: 2

Latest Answer

Java 8 does not support High DPI, the UI gets scaled up by Windows. You should use Java 11 or a later version which support per-monitor High DPI settings. If your goal is to make the icons look crisp,...
test-img

Alexey Ivanov

Posts

Questions

Blogs

Jobs

The ultimate platform for coders and IT specialists

About

  • Company
  • Support

  • Platform

  • Terms & Conditions
  • Privacy statement
  • Cookie policy
  • Cookie option
  • OnlyCoders © 2025  |  All rights reserved