appautorun TacAppAutoRun component
Hierarchy Properties Events See also
Return to Introduction  Previous page  Next page
Overview
The acAppAutoRun component is able to run your program on every Windows startup (after system reboot). Simply drop this component onto your main form, set up a few properties and your program will automatically running after every reboot.  
 
With acAppAutoRun you can easily determinate when your program started by user or automatically on Windows startup. When it started automatically, your program will have "/autorun" command line parameter that can be easily determined on OnAutoRun event or by standard ParamStr(1) function. You can check this parameter in your program to identify whether the program was started automatically or by user.  

Key properties
AutoRuncontrols whether the application is able to auto-run on startup.  
RunForcontrols for whom this app should be started (for current user or for all users on current machine).  
key events
OnAutoRunoccurs when application started on startup.  

Cool features
acAppAutoRun is successor of acCustomCaptionButton class. It may have corresponding button on the form's title bar and the menu item associated with this button in the system menu.  
   appautorunss  

How to change the glyphs for auto-run button ?
To change the glyphs for roll up/down buttons you have to modify the ACCB_AUTORUN_ENABLED and ACCB_AUTORUN_DISABLED bitmap resources in the "CaptionButtons.res" file of the AppControls pack. You can change them using standard Image Editor program which supplies with every Delphi/BCB version.  
 
After modifying of these glyphs in the "CaptionButtons.res", they will always with you in any programs, so you will do not need to specify the glyphs every time when you drop component onto form.  

See also
Other components which contains a built-in caption button: acTrayIcon, acFormHelp, acFormTopmost, acFormRoller.