开发者

Process.Start and Dual Monitors

开发者 https://www.devze.com 2023-01-16 17:05 出处:网络
if I\'m using Process.Start to open a file from a C# WinForms app, is there any way to control which monitor the pd开发者_开发问答f (or whatever) opens in?You\'ll need to do two things: get the window

if I'm using Process.Start to open a file from a C# WinForms app, is there any way to control which monitor the pd开发者_开发问答f (or whatever) opens in?


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

0

精彩评论

暂无评论...
验证码 换一张
取 消