Solved

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

Posted on 2006-11-10
1
168 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Visual Studio editor? 1 38
Recommendation vb6 to vb.net or others 14 105
Help with LINQ and XML 10 26
Pagebreak issue while printing the aspx page 3 14
Article by: Kraeven
Introduction Remote Share is a simple remote sharing tool, enabling you to see, add and remove remote or local shares. The application is written in VB.NET targeting the .NET framework 2.0. The source code and the compiled programs have been in…
Introduction When many people think of the WebBrowser (http://msdn.microsoft.com/en-us/library/2te2y1x6%28v=VS.85%29.aspx) control, they immediately think of a control which allows the viewing and navigation of web pages. While this is true, it's a…
This tutorial demonstrates a quick way of adding group price to multiple Magento products.
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

914 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

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now