I want some code to detect if a monitor is plugged into my pc. Either hdmi or vga port
Just wondering
Thanks
Is it possible to detect when monitor is plugged in?
Re: Is it possible to detect when monitor is plugged in?
Hi Omar,
I don't know whether there is a direct way to find out. You can try by checking the (virtual) screen resolution, if it increased, there is an additional monitor: https://autohotkey.com/docs/Variables.htm#Screen
A workaround for the question hdmi or vga could be via the device name. If you connect a monitor via VGA, it's usually just called PnP-Monitor. If it's connected via HDMI, it has the correct name (e.g. Acer Hd193W)
I don't know whether there is a direct way to find out. You can try by checking the (virtual) screen resolution, if it increased, there is an additional monitor: https://autohotkey.com/docs/Variables.htm#Screen
A workaround for the question hdmi or vga could be via the device name. If you connect a monitor via VGA, it's usually just called PnP-Monitor. If it's connected via HDMI, it has the correct name (e.g. Acer Hd193W)
- Micromegas
- Posts: 260
- Joined: 28 Apr 2015, 23:02
- Location: Germany
Re: Is it possible to detect when monitor is plugged in?
SysGet gives you, in addition to the device name, more valuable information, such as the MonitorCount and the bounding coordinates of each monitor.
Re: Is it possible to detect when monitor is plugged in?
thanks guys.
i checked on python and many are frustrated because there is no easy method to detect
instead, they constantly have to poll to get data - which uses up resources
the methods mentioned, i assume needs polling?
i checked on python and many are frustrated because there is no easy method to detect
instead, they constantly have to poll to get data - which uses up resources
the methods mentioned, i assume needs polling?
Who is online
Users browsing this forum: Rohwedder and 224 guests