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. Visual Basic
  4. Multiple Monitors

Multiple Monitors

Scheduled Pinned Locked Moved Visual Basic
help
3 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.
  • R Offline
    R Offline
    Robert Gronenthal
    wrote on last edited by
    #1

    I have two monitors on two separate video cards and would like to display a form on the second monitor automatically when launched. I have form A launching on the first screen and form b launching at the same time. I want form B to go to the second screen. Any help greatly appreciated!! Thanks, Bob

    C A 2 Replies Last reply
    0
    • R Robert Gronenthal

      I have two monitors on two separate video cards and would like to display a form on the second monitor automatically when launched. I have form A launching on the first screen and form b launching at the same time. I want form B to go to the second screen. Any help greatly appreciated!! Thanks, Bob

      C Offline
      C Offline
      Charlie Williams
      wrote on last edited by
      #2

      The upper left corner of the screen on the primary monitor is 0, 0. So, assuming both monitors are the same size (1280 by 1024, let's say), the upper left corner of the screen on a secondary monitor placed to the left of the primary would be -1280, 0. If the secondary is to the right of the primary, the upper left corner would be 1281, 0. If it's above it's 0, -1024 and so forth and so on...

      frm2.StartPosition = FormStartPostition.Manual;
      frm2.Location = new Point(-900, 200);

      Charlie if(!curlies){ return; }

      1 Reply Last reply
      0
      • R Robert Gronenthal

        I have two monitors on two separate video cards and would like to display a form on the second monitor automatically when launched. I have form A launching on the first screen and form b launching at the same time. I want form B to go to the second screen. Any help greatly appreciated!! Thanks, Bob

        A Offline
        A Offline
        apferreira
        wrote on last edited by
        #3

        In multimonitor environments use the DesktopLocation property instead of the Location property to correctly position forms.

        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