[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

File association

Posted on 2004-10-20
2
Medium Priority
?
276 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 2000 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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Well, all of us have seen the multiple EXCEL.EXE's in task manager that won't die even if you call the .close, .dispose methods. Try this method to kill any excels in memory. You can copy the kill function to create a check function and replace the …
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…
We’ve all felt that sense of false security before—locking down external access to a database or component and feeling like we’ve done all we need to do to secure company data. But that feeling is fleeting. Attacks these days can happen in many w…
Suggested Courses

649 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