On May 25, 11:28 am, Kevin <kevinp@nospam_cfl.rr.comwrote:
Does anyone know a simple way to have a program start with the main
form maximized on Display2?
Assuming Display2 shows up as Screen.AllScreens(1) add this to a
module:
Public Sub Main()
Application.EnableVisualStyles()
Dim f As New MainForm()
f.StartPosition = FormStartPosition.Manual
' You'll want to do some checking/error handling here to
' prevent an IndexOutOfRangeException from occuring
f.Top = Screen.AllScreens(1).WorkingArea.Y
f.Left = Screen.AllScreens(1).WorkingArea.X
f.WindowState = FormWindowState.Maximized
f.ShowDialog()
End Sub
Doing this requires you turn off the ApplicationFramework and select
Sub Main as the starting point.
Thanks,
Seth Rowe