Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

associate files

Posted on 2001-08-05
9
Medium Priority
?
315 Views
Last Modified: 2010-05-02
HI,
I have created a Text Editor,
How I can associate *.txt files with my Editir.
meaning: when someone will click on a txt file,
instead of seeing it in Notepad, he will see it in
my Text Editor.

Thanks,
0
Comment
Question by:CTrip1
[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
9 Comments
 
LVL 3

Accepted Solution

by:
andysalih earned 300 total points
ID: 6353389

Please read the disclaimer at the end of this page, before preforming this procedure.
If you open a file from Windows Explorer and Windows 95/98 has associated the file with the wrong application, this can be fixed.

1. Open Windows Explorer and select the file that you're having trouble with, by left clicking once on it.

2. Press and hold the Shift key as you right-click the file once.

3. From the pop-up menu, choose "Open With" to display the Open With dialog box.

4. Choose the program you want to associate with the selected file type. You can choose the "Always" option if you want the system to always use this new association. Select OK to reassign the association.

cheers
Andy
0
 
LVL 6

Expert Comment

by:JonFish85
ID: 6353397
check this out:

http://www.vbsquare.com/files/association/

hope it helps!
0
 
LVL 3

Expert Comment

by:andysalih
ID: 6353402
or

To manually associate a file format with an application, but not the application's file icon:
1. Choose Start > Programs > Windows Explorer.
2. Select a file whose file format association you want to change. For example, if you want to change the file format association for all TIFF files, select a TIFF file.
3. Press Shift+F10, or Shift+right-click the file you selected in step 2.
4. Choose Open With from the pop-up menu. (If Open With is not available, repeat steps 2-3.)
5. In the Open With dialog box, select the application with which you want to associate the file format. If the application isn't listed, click Other, then locate the desired application.
6. Select the option labeled "Always use this program to open files of this type" and click OK.
7. Repeat steps 1-6 for any other file format associations you want to change.


hope this helps
Andy

0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
LVL 28

Expert Comment

by:Ark
ID: 6354359
Hi

Dim objWSHShell As Object
Set objWSHShell = CreateObject("WScript.Shell")
        objWSHShell.RegWrite "HKCR\txtfile\shell\open\command", "c:\Editors\MyCoolEditor.exe %1"
Set objWSHShell = Nothing

Cheers

0
 
LVL 53

Expert Comment

by:Ryan Chong
ID: 6354592
Hi CTrip1,

Another useful link: http://www.mvps.org/vbnet/code/reg/association.htm

'Hope will help.
0
 
LVL 49

Expert Comment

by:DanRollins
ID: 7198492
Hi CTrip1,
It appears that you have forgotten this question. I will ask Community Support to close it unless you finalize it within 7 days. I will ask a Community Support Moderator to:

    Accept andysalih's comment(s) as an answer.

CTrip1, if you think your question was not answered at all or if you need help, just post a new comment here; Community Support will help you.  DO NOT accept this comment as an answer.

EXPERTS: If you disagree with that recommendation, please post an explanatory comment.
==========
DanRollins -- EE database cleanup volunteer
0
 
LVL 5

Expert Comment

by:Netminder
ID: 7213239
Per recommendation, force-accepted.

Netminder
CS Moderator
0
 

Expert Comment

by:lillockey
ID: 8145590
now hang on a second, here.

I have a question while we are on the topic.  How is it that you get you app to associate with the file type ... hmmmmm (for give me I'm a n00b).

For instance, when I open a given file type in explorer, how does my program know what exactly to do with that file?
0
 
LVL 5

Expert Comment

by:Netminder
ID: 8145674
lillockey,

You'll have a better chance of getting an answer if you ask a new question...

Netminder
EE Admin
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
This article describes how to use a set of graphical playing cards to create a Draw Poker game in Excel or VB6.
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
Suggested Courses

670 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