
creating file association for vb exe
i dont know how to associate the exe with a filetype from VB. but i do know
that when you find out how to associate it, then when you doubleclick on say
a .txt file (if thats what your associated with), then the filename of the
file you are loading will be in the Command$ string in VB. Example:
Sub Form_Load()
msgbox Command$ ' that is the path of the file that is being
loaded
End Sub
hope this helps
Noah
Quote:
> I was wondering if anyone has any information on creating file
associations
> that can be opened with a vb exe.
> for example:
> If I was to write a notepad replacement in Visual Basic 5 that views text
> files, In order for me to simply click on a text file in windows explorer
> and have it opened by the notepad replacement I would have to create
> registry entries that associate the "text file type" with the notepad
> replacement.
> that is fine. I can do that.
> the next part of the problem is how does the vb notepad replacement know
> which file I just clicked on? That is what code or whatever do I need to
> include in the program so that it "knows"? i have heard that it involves
> something called a "shell extension". Is that true?
> Any help would be greatly appreciated.