Visual Basic 2008 Tutorials
www.reflectionforbrain.com

 

Back | Index

show form on a second screen: Dual Monitor

Your project must have 2 forms: the second form in named ShowForm in this project:

Here is the code for the first form:

Public Class Form1

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click


Dim screen As Screen

'Show the form on second screen

screen = screen.AllScreens(1)



ShowForm.StartPosition = FormStartPosition.Manual



ShowForm.Location = screen.Bounds.Location + New Point(100, 100)



ShowForm.Show()

End Sub