Library tutorials & articles
File Assocation
By James Crowley, published on 14 Jul 2001
Introduction
In this article, we are going to discuss File Association and opening files when they are clicked on in Explorer. For example, imagine you have a program called TextMagic - an advanced text editor. You have your own file format, with a tmg file extension. When your user clicks on a file in explorer with a tmg extension you want your program to automatically run and then open that file. How on earth do we get this to happen? Using File Association!
Related articles
Related discussion
-
Regarding Visual Basic Programme
by manjunathsl2007 (0 replies)
-
how do you hide all in VB6
by CapnJack (1 replies)
-
Problem with Input File
by novavb6 (3 replies)
-
How to produce a txt file with a table??
by novavb6 (1 replies)
-
VB6 compatability from XP to Vista
by bronx (1 replies)
Hi Can you please also tell how to do it in .Net using VB.Net or C# ...
This looks like it could be the answer to my problem, but in case i stuff it up somehow could you tell me how to reverse the changes that are made to the registry by this code please?
Thanks
please help me..,
i have problem, i can't load file word (*.doc) from vb, can u tell me how to do it??
thx b4.
please send ur coding to niel_onggan@yahoo.com
That's your procedure that does whatever when its been given a filename (ie loading the file into a textbox or something)
The code is working fine, except for the OpenFile bit.
The comment says to call your openfile procedure.
What is the OpenFile command?
In using implimens this process into an application, I noticed the following line:
ret = RegSetValue&(lphKey, "shellopencommand", REGSZ, sKeyValue, MAXPATH)
did not properly register the association. I am using Windows 98 and had to change the above line to:
ret = RegSetValue&(lphKey, "shell\open\command", REGSZ, sKeyValue, MAXPATH)
to get it to work properly.
This thread is for discussions of File Assocation.