What is the best way to autostart an action after OnShow event?

前端 未结 3 1354
梦毁少年i
梦毁少年i 2020-12-15 23:14

I have a small application that most of the time have an action behind a Start-button that should be triggered from the commandline parameter /AUTORUN. If that parameter is

3条回答
  •  伪装坚强ぢ
    2020-12-15 23:59

    An easy way would be a timer, with an event like this:

    begin
      Timer1.Enabled := False;
      if FindCmdLineSwitch('AUTORUN') then
        btnStart.Click;
    end;
    

    And an interval of a few thousand milliseconds.

提交回复
热议问题