We help IT Professionals succeed at work.

Hello World - C# - System Tray - Reboot !


I want to do a little comercial product with Visual C# Express

Microsoft Visual Studio 2008
Version 9.0.21022.8 RTM
Microsoft .NET Framework
Version 3.5

Installed Edition: C# Express

Microsoft Visual C# 2008   91910-152-0000061-60621
Microsoft Visual C# 2008



Starting my difficulties:

1) Never understood and dig much about .dll libraries into making a single .exe file ready to deploy for installation. I actually don't know how to create the most simple hello world with a 30 trial period and a serial thereafter.

2) I heard about Starter Kits but my Visual C# Studio doesnt seem to come with any of that template projects.

3) My main difficultie now is where about to bring my Icon (.ico) file to be placed choosed browsing from a directory where I have images. In Macromedia Flash I would just import my "thing" to the stage and convert it to one symbol. How then must I locate the file I want to use in my NotifyIcon ??

4) I want the aplication to start working always on boot unless turned off to do so. What is the best approach for that?

5) I want to compile the source code into a ready to a .exe file that automatically unpacks everything and instals it without any complications. If I press F5 after my Program.cs will I get my .exe file deployed and ready to upload? No. So, what exactly will I have to do?


Many thanks,
Daniel Alexandre

" A curva de uma função nunca pode ser como a de uma mulher grávida de pé."
Watch Question

By the sounds of your needs (package into a single downloadable file and the need to set a registry key to add you're program to startup) you're going to need to package it into an installer. http://www.google.co.uk/search?q=free%20windows%20installer
As icr said, I'll just add the installer I recommand is Inno Setup with the helping hand of ISTool to create the setup scripts with ease. Now to add a program to startup using ISTool is by:
Registry > right click a field > new item
there fill in the following details:

Subkey: SOFTWARE\Microsoft\Windows\CurrentVersion\Run
     Type: string
     name: <Your short app name>
     data:  {app}\<Your desired EXE name>

check "create value if  it doesn't exist" and "delete value on uninstall".

This program using ISTool is very easy and also add a context menu when u right click a compile
script file for easy recompiling a setup.

About 3), I didn't cleary understand the question your asking. Do you mean how to load a icon file from a  predefined dir? a user selected file?
Or did you mean after loading it, how to set it as a notify icon.

Forced accept.

EE Admin

Explore More ContentExplore courses, solutions, and other research materials related to this topic.