multiple-monitors

Programmatically change screen resolution?

扶醉桌前 提交于 2019-11-26 07:41:55
问题 Is there a way to programmatically change the screen resolution or enable/disable multiple monitors in Windows XP? For example to change from 1024x768 with one monitor to 1280x104 on two monitors? I would be most interested in a win32 function to do this but anything that can be tied to a windows shortcut would suffice. 回答1: You can use EnumDisplayDevices to figure out what displays you have available and EnumDisplaySettings to get a list of available resolutions for your displays. Use

Launch an application and send it to second monitor?

时光总嘲笑我的痴心妄想 提交于 2019-11-26 05:28:32
问题 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! 回答1: 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

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

 ̄綄美尐妖づ 提交于 2019-11-26 04:24:53
问题 This question already has answers here : Showing a Windows form on a secondary monitor? (8 answers) Closed 6 years ago . 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. 回答1: You need to use the Screen class to find a screen

Showing a Windows form on a secondary monitor?

送分小仙女□ 提交于 2019-11-26 03:38:31
问题 I\'m trying to set a Windows Form on secondary monitor, as follows: private void button1_Click(object sender, EventArgs e) { MatrixView n = new MatrixView(); Screen[] screens = Screen.AllScreens; setFormLocation(n, screens[1]); n.Show(); } private void setFormLocation(Form form, Screen screen) { // first method Rectangle bounds = screen.Bounds; form.SetBounds(bounds.X, bounds.Y, bounds.Width, bounds.Height); // second method //Point location = screen.Bounds.Location; //Size size = screen

Show JFrame in a specific screen in dual monitor configuration

假装没事ソ 提交于 2019-11-26 02:54:51
问题 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? 回答1: public static void showOnScreen( int screen, JFrame frame ) { GraphicsEnvironment ge = GraphicsEnvironment .getLocalGraphicsEnvironment(); GraphicsDevice[] gs = ge.getScreenDevices();