Most times we want our main panel to automatically activate but sometimes we need to be able to control the activation.
For example we have programs that depending on a command line parameter either run automated or manual. If we run them automated we do not want to see the panel on the screen of course.
First in the panel we disable auto activation
Object oMain is a Panel Set Label to "Import ORU" Set Location to 4 3 Set Size to 300 450 Set Auto_Activate_State to False
then we add the following code at the bottom after the panel
Procedure ProcessCMDLine String sCMD CMDLINE sCMD If (Trim(Uppercase(sCMD))="/AUTO") Begin Send DoAutoProcess to ... Abort End Else Send Activate to oMain End_Procedure Send ProcessCMDLine