Opening an application from an associated file extension

Bozz

Member
Joined
Jul 28, 2009
Messages
14
Programming Experience
Beginner
How does an application know what file opened it? For instance: If I click Notepad.exe, a blank notepad opens. But if I click Words.txt, the same application opens, but showing the saved text in the Words.txt file. I can make my application save user input to a file with an associated file extension. When I click on that file, my application opens. I know how to use streamwriter/streamreader etc. But what code do I put into my application so that it detects which file opened it? I don't know where to begin looking.
 
Last edited:
Back
Top