Hello, how can i call button_name->PerformClick(); when for example i start winform program from cmd with argument callbutton(nameOfExe.exe callButton).
I am afraid there is no way to do it. You can access a button or function only after you have created the form - an exception would be a static function.
What do you actually want to do ?
Why not using the FormLoad event in the form or override the form constructor ?
for example i have button_backup when i press this, then i backup folder specified in string and i want call this from cmd, for example from batch file in Scheduled jobs in windows, because without this i cant call this. FOr this i need specified console application when in form it not works :/
or how can i make timed actions on my program? for example run my program as service, minimize in tray area and for example when time is 20:00 then program start function. time action can be done via DateTime or timestamp and check every second via while cycle i think and service i must learn with tray too. or better solution? if yes, please tell me :) thanks
As I understand you can specify the time and program Windows will start so the program can do the backup - it doesn't matter if console or form app , no need for batch file.
Creating a tray app or windows service would be an other option. Create a timer and check the time periodically. When it is time do the backup and shut down the app.