monitor

Delphi7: Get attached monitor properties

旧巷老猫 提交于 2019-12-10 16:37:51
问题 How do I get my monitor's properties? I'm mostly interested in the manufacturer name and model type. I also don't want to get it from the registry. (Some PC's like my work PC has restricted access to the property key so I'd rather want to scan a system bus or something other than the reg.) Any ideas? Thanks SoulBlade 回答1: try using the Win32_DesktopMonitor WMI Class. this class have all the information wich you are looking. check this sample code. program GetWMI_MonitorInfo; {$APPTYPE CONSOLE

Detect Physical dimension of Monitor

此生再无相见时 提交于 2019-12-10 16:08:43
问题 I want to get the display dimensions of my monitor. Is it possible to do with JavaScript or Flash? I tried the following function: var dpi_x = document.getElementById('testdiv').offsetWidth; var dpi_y = document.getElementById('testdiv').offsetHeight; var width_in = screen.width / dpi_x; var height_in = screen.height / dpi_y; var diagonal_in = Math.round(10 * Math.sqrt(width_in * width_in + height_in * height_in)) / 10; but it doesn't show the fixed diagonal value... because when I change the

How to use a monitor which is not part of desktop (Windows 7)

拥有回忆 提交于 2019-12-10 14:27:34
问题 I would like to use a monitor which is actually marked "disconnected" in the windows control panel under "Change display settings". (I do NOT mean a physically disconnected monitor.) I know how to add a second monitor in Windows and make it part of desktop. I also know how to make my application run on a primary or on secondary monitor when they are part of desktop. I have a piece of equipment attached to the PC which has a touch screen on it. The touchscreen is connected to the PC over USB

Screen area vs Work area rectangle

一曲冷凌霜 提交于 2019-12-10 03:26:20
问题 Have a look at this API documentation page... Can anyone explain to me the difference between the rcMonitor and rcWork components of the MONITORINFO structure? Although I'm happy with the idea that a window has areas you can't work with (like the caption for instance), I don't really see how this applies to monitors... All contributions gratefully received... Martin 回答1: rcMonitor is the total resolution of the display rcWork is the max area you can use,eg if you went fullscreen maximized a

Detecting if the monitor is powered off

旧城冷巷雨未停 提交于 2019-12-10 02:58:52
问题 I have a kiosk type application and I need to be notified if the LCD TV is powered off so I can chastise someone. I'm running Ubuntu 10.10 with nVidia video cards and the nVidia drivers. The TVs are plugged in via HDMI. I've taken a look at nvidia-settings -q ConnectedDisplays and nvidia-settings -q EnabledDisplays , but both always report the monitor is connected. I'm guessing that this value is only set once when the monitor is first powered on? I've also looked at xrandr --properties and

test memory consumption of a java program with eclipse [closed]

喜夏-厌秋 提交于 2019-12-08 17:33:44
问题 As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance. Closed 6 years ago . Is there a plugin in eclipse that I could use to test who much memory has my just run program cost? I am thinking there may be a

How do you find the owner of a lock (Monitor)?

柔情痞子 提交于 2019-12-08 16:45:46
问题 Is there a way to discover what thread currently owns a lock? Specifically I am looking for some code to print out the thread that is preventing a lock from being taken. I want to try to lock for a given timeout, then report which thread is blocking the lock from being taken. 回答1: No. Just write the code: private int lockOwner; private object lockObject = new object(); ... void foo() { lock(lockObject) { lockOwner = Thread.CurrentThread.ManagedThreadId; // etc.. } } There an otherwise

Qt or PyQt - check when file is used by another process. Wait until finish copy

余生颓废 提交于 2019-12-08 13:57:28
问题 Good morning, What is the best strategy for check when a big file o big directory has finished to copy? I want wait until a file has finish fully to copy. Is there a code example in q I'm working on mac os x. thanks Update I use QFileSystemWatcher. the problem is that I receive file or directory change notification when o copy it is in progress. So user copy a big folder (inside many files), the operating system copy process start, it take 5 minuts, but in same times my application receive

How to start linux with gui without monitor? [closed]

冷暖自知 提交于 2019-12-08 13:52:35
Closed. This question is off-topic . It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 7 years ago . I met a problem. I had a server which is installed redhat enterprise 5.5. And one Qt program was running on this server. So what I should do is to turn on my server, the server will start automaticly with Gui and that Qt program will start automaticly. I finished all on my desktop. But while I start this server without monitor, we know server was running without monitor,the X server go bad.God, what should I do?

Constantly look for file, when file exist, run command

淺唱寂寞╮ 提交于 2019-12-08 11:17:05
问题 I need a vbscript that monitors a folder for a specific file, when file is found it needs to execute a command then delete that file but continue to monitor the folder again for the same file incase it needs to run again. This... Set FSO = CreateObject("Scripting.FileSystemObject") Do While 1>0 If FSO.FileExists (file.txt) Then FSO.DeleteFile (file.txt) CreateObject("WScript.Shell").Run "c:\windows\notepad.exe" End If WScript.Sleep 1000 Loop Gave me an "object required: file" error. update,