Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. Multiple Monitor question

Multiple Monitor question

Scheduled Pinned Locked Moved C#
csharpcomtutorialquestion
5 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • P Offline
    P Offline
    pgfraz
    wrote on last edited by
    #1

    "How to develop a screen saver in C# By Rakesh Rajan" is the template I've been using to for multiple monitor support, but when i try to implement it into my code only one monitor pops up with screensaver and when i do either mouse event or keyboard event that monitors screensaver kills and then the other monitor pops up with screensaver. I'm guessing that it won't load next screens form until current form is termated. Here is the code... for(int i=Screen.AllScreens.GetLowerBound(0); i<=Screen.AllScreens.GetUpperBound(0); i++) Application.Run(new ScreenSaverForm(i)); Do i use a thread or something.. been workin on this last part of project for a while now.. any suggestions FYI.. I'm not rich. My desktops motherboard died and i just plugged monitor into back of laptop. Codemonkey pgf_codemonkey@hotmail.com

    H 1 Reply Last reply
    0
    • P pgfraz

      "How to develop a screen saver in C# By Rakesh Rajan" is the template I've been using to for multiple monitor support, but when i try to implement it into my code only one monitor pops up with screensaver and when i do either mouse event or keyboard event that monitors screensaver kills and then the other monitor pops up with screensaver. I'm guessing that it won't load next screens form until current form is termated. Here is the code... for(int i=Screen.AllScreens.GetLowerBound(0); i<=Screen.AllScreens.GetUpperBound(0); i++) Application.Run(new ScreenSaverForm(i)); Do i use a thread or something.. been workin on this last part of project for a while now.. any suggestions FYI.. I'm not rich. My desktops motherboard died and i just plugged monitor into back of laptop. Codemonkey pgf_codemonkey@hotmail.com

      H Offline
      H Offline
      Heath Stewart
      wrote on last edited by
      #2

      Application.Run is a blocking call that starts the message pump and wants until the main form is closed. Since this is in a loop, when the main form is close then the next iteration of your loop executes. You should instead design your form to span multiple monitors (see SystemInformation.VirtualScreen).

      Microsoft MVP, Visual C# My Articles

      W 1 Reply Last reply
      0
      • H Heath Stewart

        Application.Run is a blocking call that starts the message pump and wants until the main form is closed. Since this is in a loop, when the main form is close then the next iteration of your loop executes. You should instead design your form to span multiple monitors (see SystemInformation.VirtualScreen).

        Microsoft MVP, Visual C# My Articles

        W Offline
        W Offline
        Wackatronic
        wrote on last edited by
        #3

        Heath, How would you push applications to a specific monitor and not just stretch the screen space? This sounds interesting for a project I'm doing. Regards, Eric C. Tomlinson Silence is golden, so shut the heck up!

        H 1 Reply Last reply
        0
        • W Wackatronic

          Heath, How would you push applications to a specific monitor and not just stretch the screen space? This sounds interesting for a project I'm doing. Regards, Eric C. Tomlinson Silence is golden, so shut the heck up!

          H Offline
          H Offline
          Heath Stewart
          wrote on last edited by
          #4

          You can use the Screen class. See Screen.AllScreens, which is a static property that returns a Screen[] array.

          Microsoft MVP, Visual C# My Articles

          W 1 Reply Last reply
          0
          • H Heath Stewart

            You can use the Screen class. See Screen.AllScreens, which is a static property that returns a Screen[] array.

            Microsoft MVP, Visual C# My Articles

            W Offline
            W Offline
            Wackatronic
            wrote on last edited by
            #5

            Thanks for the great hint. I appreciate it. Regards, Eric C. Tomlinson

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • World
            • Users
            • Groups