简体   繁体   中英

How to make an application automatically start at Windows start?

I am new to .NET, I have made a small app. I want that this app should start when we start Windows, also how to make this app be present like a system tray icon if we minimize it. The app is a Windows form application.

As far as having it start automatically you can make it a windows service or you can simply place it in the windows startup folder and it will automatically launch it. For the System tray you should look into the NotifyIcon control.

For starting: couple of options..

1: Use scheduled tasks - accessed through control panel / adminstrative tasks 2: Make a shortcut to your exe in the startup folder in your start menu

For system tray: refer to this question: What's the proper way to minimize to tray a C# WinForms app?

in addition to what @Jesus said

you can also add a registry entry for start up. Windows service wouldn't do if your app is requiring the tray icon.

Best bet IMO is to make an installer project and configure the installer to have it start with windows when it's installed. Let the installer figure it out.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM