Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How do I make my VB application the default viewer for specified files

Status
Not open for further replies.

johnfra

Programmer
Sep 19, 1999
10
CA
When I double click on any file with the extension TXT, I want my VB application to open. I know how to do this manualy through the view options, but I would like to code it in to my application ?
 
Don't know - but please post the answer if you find out from somewhere else.<br>
<br>
Regards<br>
<br>
Mike<br>
---<br>
Mike_Lacey@Cargill.Com
 
Hi johnfra!<br>
<br>
Look in the registry for HKEY_CLASSES_ROOT\txtfile. You need to modify the open command to point to your program.<br>
<br>
Chip H.<br>

 
so what that means, john, is that you need to code a registry hack into your installation...<br>
<br>
Do so with care! <br>
<br>
Because, Chip, if he manually edits the registry, he might as well be doing it in view!<br>
<br>

 
MadArse --<br>
He may want to look at how some image editing & sound programs do it -- they tell you what they're about to do before they do it, then every time they run, they check to see if they are the default program for the extensions they're interested in. If they aren't, they give you the option to make themselves the default again (or not).<br>
<br>
I find that programs that switch my default behavior without telling me are very annoying, and it's a black mark against them.<br>
<br>
Chip H.<br>

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top