multiple-monitors

Launch an application and send it to second monitor?

旧街凉风 提交于 2019-11-26 17:34:01
Is there any way to start/lunch a program through Process in another screen? Someone asked that here but there was no answer. Note: it is not a form in my app, I'm asking about running an external program in another screen! Since the window is not yours, you can only move it by invoking the Windows API. You will have to do this: Launch the process. Use FindWindow to retrieve the handle to the window. If the window doesn’t exist yet, the process hasn’t created it yet; sleep for 500ms and then try again. (But don’t go into an infinite loop; stop if you can’t find the window after a reasonable

Take screenshot of multiple desktops of all visible applications and forms

夙愿已清 提交于 2019-11-26 16:29:23
问题 I'm working with a system that has 4 outputs (monitors) with e.g. 1280x1024 pixels for each output. I need a screenshot of the whole desktop and all open applications on it. I tried GetDesktopWindow() (MSDN) but it doesn't work properly. Some forms don't shown on the captured picture. 回答1: i tried GetDesktopWindow() function but it doesn't work properly. Of course not. The GetDesktopWindow function returns a handle to the desktop window. It doesn't have anything to do with capturing an image

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

久未见 提交于 2019-11-26 15:54:42
问题 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)? 回答1: You can't specify the monitor, but you can specify the position of the popup window as being relative to the where the

How do I ensure a form displays on the “additional” monitor in a dual monitor scenario? [duplicate]

我怕爱的太早我们不能终老 提交于 2019-11-26 15:25:09
This question already has an answer here: Showing a Windows form on a secondary monitor? 8 answers I have an application in which there is a form which I want to show on second screen. Mean If application is running on screen A and when I click on menu to show Form it should display on Screen B and same with if application is running on screen B and when I click on menu to show Form it should display on Screen A. SLaks You need to use the Screen class to find a screen that the original form is not on, then set the second form's Location property based on that screen's Bounds . For example: var

Show JFrame in a specific screen in dual monitor configuration

余生颓废 提交于 2019-11-26 13:02:21
I have a dual monitor config and I want to run my GUI in a specific monitor if it is found. I tried to create my JFrame window passing a GraphicConfiguration object of my screen device, but it doesn't work, frame still display on the main screen. How can I set the screen where my frame must be displayed? public static void showOnScreen( int screen, JFrame frame ) { GraphicsEnvironment ge = GraphicsEnvironment .getLocalGraphicsEnvironment(); GraphicsDevice[] gs = ge.getScreenDevices(); if( screen > -1 && screen < gs.length ) { gs[screen].setFullScreenWindow( frame ); } else if( gs.length > 0 )

How do I enable a second monitor in C#?

╄→尐↘猪︶ㄣ 提交于 2019-11-26 12:40:14
问题 Is it possible to enable a second monitor programatically and extend the Windows Desktop onto it in C#? It needs to do the equivalent of turning on the checkbox in the image below. 回答1: MSDN Device Context Functions What you basically need to do: Use the EnumDisplayDevices() API call to enumerate the display devices on the system and look for those that don't have the DISPLAY_DEVICE_ATTACHED_TO_DESKTOP flag set (this will include any mirroring devices so not all will be physical displays.)

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

烂漫一生 提交于 2019-11-26 12:11:28
问题 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. 回答1: 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

Going fullscreen on secondary monitor

有些话、适合烂在心里 提交于 2019-11-26 10:45:33
问题 How can you program a dotNet Windows (or WPF) Application in order to let it going fullscreen on the secondary monitor? 回答1: Extension method to Maximize a window to the secondary monitor (if there is one). Doesn't assume that the secondary monitor is System.Windows.Forms.Screen.AllScreens[2]; using System.Linq; using System.Windows; namespace ExtendedControls { static public class WindowExt { // NB : Best to call this function from the windows Loaded event or after showing the window //

Restoring Window Size/Position With Multiple Monitors

柔情痞子 提交于 2019-11-26 10:18:18
问题 Many posts around about restoring a WinForm position and size. Examples: www.stackoverflow.com/questions/92540/save-and-restore-form-position-and-size www.codeproject.com/KB/dialog/restoreposition.aspx?fid=1249382&df=90&mpp=25&noise=3&sort=Position&view=Quick&select=2595746 But I have yet to find code to do this with multiple monitors. That is, if I close my .NET Winform app with the window on monitor 2, I want it to save the windows size, location, and state to the application settings, so

How do I get the actual Monitor name? as seen in the resolution dialog

空扰寡人 提交于 2019-11-26 07:42:26
问题 I am trying to grab the friendly name for the monitors on my system. I am using C#. I have tried Screen , which just gives me //./DisplayXX . I have also tried both Win32_DesktopMonitor and EnumDisplayDevices , they all give me variations of //./DisplayXX OR Generic Monitor , whereas I know my displays names are SyncMaster and SM2333T . Now Windows knows what these monitors are, displays them in the Devices and Printers windows with the correct names, and also in the dialog for setting