Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Receive arguments

Status
Not open for further replies.

robertfah

Programmer
Mar 20, 2006
380
US
I need to know how to let my app receive an argument when it's open.

Our program will launch when a user double-clicks a file (that we've associated with our program) and we need to know what the name of the file is that opened it.

any ideas?
 
Unregard....figured it out:

static void Main(string[] args)
{
string SelectedFile;

if (args.Length > 0)
{
MessageBox.Show(args[0].ToString(), "caption");
}
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top