File Association

Yodanssen

New member
Joined
Mar 12, 2006
Messages
2
Programming Experience
Beginner
Hi ! Great forum you have here !

I have one problem !

Could you tell me how I can open a text (*.txt file format) in my form (richtextbox) when I'm doubleclick file on my desktop !

I know how to associate file format with my App.!

This is for my Wordpad replacement software ! :)

I'm using Visual Basic 2005

Big Thanx !
 
You of course remembered to add your application to the Open action with default %1 parameter. Now use Environment.GetCommandLineArgs() and check if second element in the string array return is a valid file (first element is application path), if so read its contents and display the text in your richtextbox.
 
Back
Top