my application in system tray on windows startup
-
Two different questions: 1) Icon in system tray: System.Windows.Forms.NotifyIcon is the class (and sample) you want. 2) Running on windows start: I don't know of any API for this but adding a registry key for your application will do: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run String Key: AppName Value: Full Path to Exe
-
hi 1) drag and drop the Notify Icon from the tool box. 2) In the Icon properties, you can set the Icon and Visble as true Then it appears when to the tray bar. 3) Do you need to start the Program at the start up,Simple way is added to application shortcut start up directory or do it using setup wizard . regards , pubudu.
-
Two different questions: 1) Icon in system tray: System.Windows.Forms.NotifyIcon is the class (and sample) you want. 2) Running on windows start: I don't know of any API for this but adding a registry key for your application will do: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run String Key: AppName Value: Full Path to Exe
-
for the second answer: how can i create a registry key during setup of my application? on the value "Full Path to Exe", how can know it (and set it on setup time) if the user during the setup chooses a custom directory on its computer?
If you're using an MSI-type installer project in Visual Studio, you can add registry keys via the registry view of said project. Drew Noakes drewnoakes.com