Reputation: 364
Here I have created one windows application (Scheduler) it is having some listbox,checkbox, buttons. I just need to run that application when windows log on particular set of time it should run.
Upvotes: 1
Views: 489
Reputation: 125197
If you want to put your application in start up and check user selected date and time and show the form to user at that times:
this.Hide()
, or this.Visible= false
in Load
event)Put application in startup
Option 1:
If you need put your application at start up programmatically, you can do it using this registry key. Write a C# code to open the key:
HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Run\
And then create string value and set a name for it and in value, put address of .exe of your appplication.
Option 2:
If you want to put your application in start up manually, you can simply put your application in startup using Addministrative Tools -> Task Scheduler -> Create Basic Task and then in wizard, In Task Trigger Page, Select When I logon.
Key Points:
If you use a .Setting
file in your project, the settings will be saved per user and you should not be worry about settings of different users.
If you put program at startup using registry or task scheduler, the program runs after user logon.
Registry trick can be applied during installation or at first run of application.
Upvotes: 1