Solved

File association

Posted on 2004-10-20
2
258 Views
Last Modified: 2010-04-23
How can I associate a data file to open with Notepad?  My program creates files with an extension *.AAA and of course Windows allows me to use it with my program since it is just text data but I would like Windows to show the Notepad icon with my *.AAA files like it does with *.txt files.  Can this be done with code in a VB.NET 2002 program?  A good commented working example would be great.  Simple answer would be to use *.txt instead of *.AAA but the name of the file is dependant on parts of my program recognizing what file to use.
0
Comment
Question by:teamdad
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 10

Accepted Solution

by:
heintalus earned 500 total points
ID: 12365850
You can create a registry key called .AAA under HKEY_CLASSES_ROOT and set its default value to txtfile

This can be done via a VB.NET program, take a look at the following for details of writing to & reading from the registry from .Net

http://www.devcity.net/forums/faq.asp?fid=30&cat=Registry&#TID3379

I've also noticed these 2 articles which should help you

http://www.devcity.net/forums/topic.asp?tid=72258

http://www.devcity.net/forums/faq.asp?fid=15&cat=Registry&#TID72502

That last link should give you exactly what your after but the others are useful references

HTH
Andy


0
 

Author Comment

by:teamdad
ID: 12365940
The class in a later post on that last link had it all without me having to retype stuff.  Great!!!!
0

Featured Post

Salesforce Has Never Been Easier

Improve and reinforce salesforce training & adoption using WalkMe's digital adoption platform. Start saving on costly employee training by creating fast intuitive Walk-Thrus for Salesforce. Claim your Free Account Now

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Since .Net 2.0, Visual Basic has made it easy to create a splash screen and set it via the "Splash Screen" drop down in the Project Properties.  A splash screen set in this manner is automatically created, displayed and closed by the framework itsel…
It’s quite interesting for me as I worked with Excel using vb.net for some time. Here are some topics which I know want to share with others whom this might help. First of all if you are working with Excel then you need to Download the Following …
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

730 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question