Link to home
Start Free TrialLog in
Avatar of ksm
ksm

asked on

Associating a file extension to an application.

In Visual Basic 5, how do you associate a file extension with an applications.  For example, how would I associate all *.ksm files with c:\myapp.exe ?

Thanx.
ASKER CERTIFIED SOLUTION
Avatar of Dr. Kamal Mehdi
Dr. Kamal Mehdi
Flag of Greece image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of ksm
ksm

ASKER

kamall:

Do you have to make ALL 3 of those calls for each association?
Thats right ksm.
Avatar of ksm

ASKER

kamall:

Sorry to take so long to get back to you.

I just tried your example and it did not work.  I didn't get an error.  But I didn't see any new entries in the registry.  I ran the program, ensured that I was executing the calls above and nothing happened.  I'm using VB5 under WinNT.

Any suggestions?

Kevin
ksm,
Sorry for being away for a long time.
Regarding your comment, the code I gave you works fine in Windows 95 and it is tested. What I can guess is that the problem is the NT platform. There might be some different settings to take into considaration.

Regards
Avatar of ksm

ASKER

The registry settings between Win95 and WinNT 4 are similar.  So the code should work in both OS's w/o having to modify it.  I got a hold of some more code and it seems to be working (got it from the MS KB site, of all places).  So your code should have worked.  I'll compare the MS stuff and the code you gave to me and get back to you shortly.

Thanks.
ksm,
Many people (me too) had problems so far on Windows NT with their developed applications that work perfectly on Windows 95. These problems do arise especially when using API calls. In most cases, no errors are reported by the NT OS.
I hope that the code you got will work, and I will be happy if you inform me of the results and show me the differences with the code I gave you.
I will be waiting for you.

Regards.