?
Solved

Set Primary Monitor (Screen) by code

Posted on 2011-10-18
5
Medium Priority
?
1,971 Views
Last Modified: 2012-06-21
How can I set / switch the Primary Monitor by programm/code.

Peter

SetPrimaryMonitor
0
Comment
Question by:PeterInStingbert
  • 3
  • 2
5 Comments
 
LVL 17

Expert Comment

by:Carlos Villegas
ID: 36985708
Hello, I think this will be useful to you:
http://www.codeproject.com/KB/system/Set_Primary_Display.aspx
0
 
LVL 1

Author Comment

by:PeterInStingbert
ID: 36988000
Thank you,
i know this codeproject article.
1)  th author says:  > The code is left raw for addition of "bells and whistles". <.
yes,  ... and any comments.

2) this code bring my system to "blue screen"

Are there other examples with more explanations ?

Peter
0
 
LVL 17

Expert Comment

by:Carlos Villegas
ID: 36988180
Hello, I will investigate more about this, I'll let you know.
0
 
LVL 17

Accepted Solution

by:
Carlos Villegas earned 1500 total points
ID: 36995515
Hello, this is another project, have you tried this?
http://www.codeproject.com/KB/dotnet/Display_Settings.aspx

Please test the example, the problem is, I don't have two monitors in my system to test it :(

Tell me if it works for you, if it does I can help you to extract only the code required to set your primary monitor.
0
 
LVL 1

Author Closing Comment

by:PeterInStingbert
ID: 37120323
Sorry i was very busy...
thank you for the solution
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

More often than not, we developers are confronted with a need: a need to make some kind of magic happen via code. Whether it is for a client, for the boss, or for our own personal projects, the need must be satisfied. Most of the time, the Framework…
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
Whether it be Exchange Server Crash Issues, Dirty Shutdown Errors or Failed to mount error, Stellar Phoenix Mailbox Exchange Recovery has always got your back. With the help of its easy to understand user interface and 3 simple steps recovery proced…
Is your OST file inaccessible, Need to transfer OST file from one computer to another? Want to convert OST file to PST? If the answer to any of the above question is yes, then look no further. With the help of Stellar OST to PST Converter, you can e…
Suggested Courses

850 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question