As I am using a laptop with a tv as its second monitor I want to make a little script which will trigger screen settings from extended to clone and when it is set to clone it should set the screen settings to extended. I want to make it in c# as it is my primary language and I think it could solve my problem.
So i have made a console application like this for now:
class Program
{
static void Main(string[] args)
{
DisplayChanger.Start();
}
private static Process DisplayChanger = new Process
{
StartInfo =
{
CreateNoWindow = true,
WindowStyle = ProcessWindowStyle.Hidden,
FileName = "DisplaySwitch.exe",
Arguments = "/extend"
}
};
}
It works fine creating a new process. But my question is, how can I check what status the "displays" have? I need that so i can run a test to see what process to start.
Thank you for your help :)