Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

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

Posted on 2006-11-10
1
Medium Priority
?
190 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 2000 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

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Question has a verified solution.

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

Well, all of us have seen the multiple EXCEL.EXE's in task manager that won't die even if you call the .close, .dispose methods. Try this method to kill any excels in memory. You can copy the kill function to create a check function and replace the …
I think the Typed DataTable and Typed DataSet are very good options when working with data, but I don't like auto-generated code. First, I create an Abstract Class for my DataTables Common Code.  This class Inherits from DataTable. Also, it can …
When cloud platforms entered the scene, users and companies jumped on board to take advantage of the many benefits, like the ability to work and connect with company information from various locations. What many didn't foresee was the increased risk…
Is your OST file inaccessible, Need to transfer OST file from one computer to another? Want to convert OST file to PST? If the answer to any of the above question is yes, then look no further. With the help of Stellar OST to PST Converter, you can e…
Suggested Courses

810 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