multiple-monitors

How can I get monitors numbers from Screen Resolution dialog in win7 programmatically?

纵饮孤独 提交于 2019-11-27 20:50:13
When you press Identify button in Screen Resolution dialog then Windows shows you big white monitor numbers on each monitor. It was easy to find them programmatically together with monitor coordinates in Windows XP (with EnumDisplayDevices) but on Windows 7 it's broken. How can I do that? EnumDisplayDevices and GetMonitorInfo are not reliable anymore for that purpose in Windows 7. I tried GetMonitorInfo and then extracting monitor number from MONITORINFOEX.szDevice (I.E. \.\Display2) with no success. Another guy did that too two years ago and claimed that getMonitorInfo has a bug. This bug was

Why does WPF MediaElement not work on secondary monitor?

十年热恋 提交于 2019-11-27 14:37:25
问题 My application uses the WPF MediaElement to play video (MOV files). This works well when playing on the Primary monitor but freezes when the window is moved to the secondary monitor. I have tried the following without success: Starting the application on the secondary monitor Swapping the primary & secondary monitors (problem transfers to the new secondary monitor) When the application window spans both monitors it works correctly but as soon as it is entirely within the secondary monitor the

How can I make a WPF window maximized on the screen with the mouse cursor?

人走茶凉 提交于 2019-11-27 14:19:16
问题 According to the MSDN documentation for the WindowStartupLocation Property: Setting CenterScreen causes a window to be positioned in the center of the screen that contains the mouse cursor. Although the MSDN doc for the CenterScreen Field itself defines it somewhat less clearly as: The startup location of a window is the center of the screen on which it is opened. A simple test shows this working as it should: MainWindow.xaml <Window x:Class="CenterScreenTest.MainWindow" xmlns="http://schemas

Display Different images per monitor directX 10

流过昼夜 提交于 2019-11-27 14:12:24
问题 I am fairly new to DirectX 10 programming, and I have been trying to do the following with my limited skills (though I have a strong background with OpenGL) I am trying to display 2 different textured Quads, 1 per monitor. To do so, I understood that I need a single D3D10 Device, multiple (2) swap chains, and single VertexBuffer While I think I'm able to create all of those, I'm still pretty unsure how to handle all of them. Do I need multiple ID3D10RenderTargetView(s) ? How and where should

Screen.AllScreen is not giving the correct monitor count

一曲冷凌霜 提交于 2019-11-27 13:40:12
I am doing something like this in my program: Int32 currentMonitorCount = Screen.AllScreens.Length; if (currentMonitorCount < 2) { //Put app in single screen mode. } else { //Put app in dual screen mode. } It is VERY important my application recognizes how many monitors are currently connected. However, after I plug/unplug the monitor a couple of times, Screen.AllScreens.Length always returns '2'. My monitor knows it's not connected (it has entered 'power save' mode), and the control panel knows that it's not connected (it shows only one monitor). So what am I missing? How do I figure out that

How do I get JavaScript to open a popup window on the current monitor

本秂侑毒 提交于 2019-11-27 12:07:25
Scenario: The user has two monitors. Their browser is open on the secondary monitor. They click a link in the browser which calls window.open() with a specific top and left window offset. The popup window always opens on their primary monitor. Is there any way in JavaScript to get the popup window to open on the same monitor as the initial browser window (the opener)? You can't specify the monitor, but you can specify the position of the popup window as being relative to the where the click caused the window to popup. Use the getMouseXY() function to get values to pass as the left and top args

How do I set up IntelliJ on dual monitors?

断了今生、忘了曾经 提交于 2019-11-27 11:51:40
问题 I have just installed IntelliJ 9.0.2 on a machine running 64-bit Ubuntu 10.04. How do I get another window to put on my second screen? I would like to have both an editor and some tool windows on both screens. 回答1: IntelliJ 14 and onwards you can select the settings cog and tick floating mode to detach menus, or drag editor tabs off the main window to detach them If you're running on OSX you'll need to make sure it's not treating the screens as separate spaces, otherwise they'll snap back

Start program on a second monitor?

£可爱£侵袭症+ 提交于 2019-11-27 11:39:29
问题 Is there a way to specify which monitor a application appears on in Delphi or C++Builder? I am developing a simple program for a customer, which displays kitchen orders on a secondary monitor, generated by a hospitality system. Currently they need to manually drag the window onto the second monitor after it starts. 回答1: Save the window position before program shutdown and restore them on startup. Multimonitor displays just increase the size of the desktop; other monitor surfaces just have a

Specify monitor when opening file. (.bat)

China☆狼群 提交于 2019-11-27 09:47:16
The following .bat file below simply opens two text files overlaying them, but I'm wondering if it's possible to define a specific display source, or if anyone can assist in providing the correct parameters. @echo off START /max /wait NOTEPAD.EXE C:\test\screen1.txt START /max /wait NOTEPAD.EXE C:\test\screen2.txt What I'm trying to get: @echo off START /max /wait NOTEPAD.EXE C:\test\screen1.txt "monitor1" START /max /wait NOTEPAD.EXE C:\test\screen2.txt "monitor2" So the results I am trying to receive is that screen1.txt opens on monitor1, and screen2.txt on monitor2. Unless the application

window.open() on a multi-monitor/dual-monitor system - where does window pop up?

旧街凉风 提交于 2019-11-27 06:53:45
When using javascript window.open() on a multi-monitor system, how do you control which monitor, or where in the display space the popup opens? It seems out of control to me and otherwise random in it's behavior. BrianH Result of "window.open dual-screen" search revealed this fancy nugget: Dual Monitors and Window.open "When the user clicks on a link that opens a new window using window.open. Make the window appear on the same monitor as its' parent." // Find Left Boundry of the Screen/Monitor function FindLeftScreenBoundry() { // Check if the window is off the primary monitor in a positive