Solved

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

Posted on 2006-11-10
1
167 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
Comment Utility
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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

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…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…

743 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

14 Experts available now in Live!

Get 1:1 Help Now