### Set Form Fill Screen

Example to set the initial mainform window size to fill the screen in AppStart.
`Sub AppStart (Form1 As Form, Args() As String)
MainForm = Form1
MainForm.WindowWidth = fx.PrimaryScreen.MaxX - fx.PrimaryScreen.MinX
MainForm.WindowLeft = fx.PrimaryScreen.MinX
MainForm.WindowHeight = fx.PrimaryScreen.MaxY - fx.PrimaryScreen.MinY
MainForm.WindowTop = fx.PrimaryScreen.MinY
MainForm.Show
End Sub`
Sub to set the form to fill the screen
`Sub SetFormFillScreen(frm As Form)
Dim ps As Screen = fx.PrimaryScreen
frm.WindowLeft = ps.MinX
frm.WindowWidth = ps.MaxX - ps.MinX
frm.WindowTop = ps.MinY
frm.WindowHeight = ps.MaxY - ps.MinY
End Sub`
Sub to set the form to fill the screen with an offset
`Sub SetFormFillScreen2(frm As Form, offset As Int)
Dim ps As Screen = fx.PrimaryScreen
frm.WindowLeft = ps.MinX + offset
frm.WindowWidth = ps.MaxX - frm.WindowLeft - offset
frm.WindowTop = ps.MinY + offset
frm.WindowHeight = ps.MaxY - frm.WindowTop - offset
Log("Fillscreen set")
End Sub`

Changed: , Category: Forms, File: T6C195M1428.htm, ID: 1428