none
How to project multiple windows on multiple screens RRS feed

  • Question

  • Hi, 

    I am developing an application, that needs to play the multiple videos on multiple screens. For example, I have a PC that is connected to 2 LED TVs and 2 videos Video1 and Video2. I want to play the Video1 at TV1 and Video2 at TV2 simultaneously.

    Using System.Windows.Forms.Screen namespace, I am able to get the attached screens but not able to play the videos on those directly, 

    Is it possbile, that from the attached screen array, I can ask my application to play the video on Form1 player and this form1 player will display or project himself on TV1 to play the video automatically (without user interaction) and same for the TV2.

    Please let me know, how can I do this.

    thanks
    Gaurav Gupta


    Gaurav Gupta

    Sunday, May 18, 2014 2:07 PM

Answers

  • Hi, please try this: create Form1 and play video1 on it, create Form2 and play video2 on it, and assume that Screen.AllScreens[1] is TV1 and Screen.AllScreens[2] is TV2, so

    add this code to Form1 will show it in TV1:

            protected override void OnLoad(EventArgs e)
            {
                this.Location = Screen.AllScreens[1].Bounds.Location;
                base.OnLoad(e);
            }

    add this code to Form2 will show it in TV2:

            protected override void OnLoad(EventArgs e)
            {
                this.Location = Screen.AllScreens[2].Bounds.Location;
                base.OnLoad(e);
            }

    Monday, May 19, 2014 9:40 AM