Process.Start and Dual Monitors
Asked Answered
O

1

6

if I'm using Process.Start to open a file from a C# WinForms app, is there any way to control which monitor the pdf (or whatever) opens in?

Opening answered 16/9, 2010 at 19:29 Comment(1)
If you like (the illusion of) control you could also go and play with Adobe ActiveX controls. I don't neccesarily reccomend it.Sochi
A
5

You'll need to do two things: get the window handle of the application (e.g. Acrobat Reader for a PDF) then move it to the monitor you want and Maximize.

These two articles should get you started:

Controlling Window State Of Other Applications using C#:
http://www.c-sharpcorner.com/UploadFile/gaurav.pilay/206232006095904AM/2.aspx

Multi-monitor programming in C#:
http://www.codeproject.com/KB/cs/multi-monitor_in_c_.aspx

Anchovy answered 16/9, 2010 at 19:38 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.