Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

Loading a form on a particular monitor in a multiple display system

Posted on 2006-11-10
1
171 Views
Last Modified: 2010-04-23
I have a two display system. VS2005 and my app are being developed on display #2. When I start the app by selecting "Start Debugging" it launches on display #2. However, one of the forms I use for a dialog box opens on monitor #1. Is there a way to specify how an application function on a multiple display system?
0
Comment
Question by:tmostad
1 Comment
 
LVL 9

Accepted Solution

by:
jrscherer earned 500 total points
ID: 17919650
Hi tmostad,
use the property  Form.StartPosition and set it to CenterParent.

Here is a snippet to play with. Put it into any form and click the screen. It will give you the start position of the screen your form is on, or more exactly, the start position of the screen you made the click on, if your form overlaps screens.

    Private Sub Form1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Click
        Dim r As Rectangle = Screen.GetBounds(Control.MousePosition)
        MessageBox.Show("This screen is at X= " & r.X & " Y = " & r.Y & "  Width = " & r.Width & "  Height = " & r.Height)

        Dim screens() As Screen = Screen.AllScreens
        MessageBox.Show("This computer has " & (screens.GetUpperBound(0) + 1).ToString & " Screens")
    End Sub

Jack.net
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

Since .Net 2.0, Visual Basic has made it easy to create a splash screen and set it via the "Splash Screen" drop down in the Project Properties.  A splash screen set in this manner is automatically created, displayed and closed by the framework itsel…
Parsing a CSV file is a task that we are confronted with regularly, and although there are a vast number of means to do this, as a newbie, the field can be confusing and the tools can seem complex. A simple solution to parsing a customized CSV fi…
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…

828 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