Using the below code, If I use Me.WindowState=Minimized the program runs
fine, but you have the taskbar showing the program running.
If I use Me.Hide instead, the program immediately exits.
If UCase(Microsoft.VisualBasic.Command) = "/SILENT" Then
Me.WindowState = FormWindowState.Minimized
silent = True
For i As Integer = 0 To clbPCs.Items.Count - 1
clbPCs.SetItemChecked(i, True)
Next
Button1.PerformClick()
Application.Exit()
End If
*** Sent via Developersdex http://www.developersdex.com ***