Click to See Complete Forum and Search --> : File association Public Sub
§tudz
Feb 19th, 2003, 03:37 AM
Hi,
For file asscoiation, do you need to create a sub or function or somthing for your program to load up the file you chose.
I have added the strings to the registry... you know the "C:\myapp.exe %1"
but this doesn't open my program or load the file into the program.
I have a sub called 'LoadPRAYFile' which is used in the load function on the program, do I need to put anything that relates to that in the registry?
Thanks
Pirate
Feb 19th, 2003, 09:55 AM
RealNickyDude
Feb 19th, 2003, 12:58 PM
Is it possible to change the extension to one thing but have your program recognise it as another?
E.g: I have a file with the extension ".cod" ("MyTest.cod") but really it's an rtf file, I want my program to recognise it as an rtf file even though the extension is ".cod"
Pirate
Feb 19th, 2003, 01:01 PM
the API would will do this Nicky .I am looking for .NET way.
Pirate
Feb 19th, 2003, 01:04 PM
another API :(
RealNickyDude
Feb 19th, 2003, 01:08 PM
This seems to lauch an application based on file extension, I want to launch a file based on what the file actually is, regardless of what the file extension is, is that possible?
Pirate
Feb 19th, 2003, 01:23 PM
I think it's possible :o . Adding your own ext to the registery would make it global ext .When you just click it , the app associated with that kind of file make is run in that app.
§tudz
Feb 20th, 2003, 06:39 AM
I already have this code, and I have done that, but it doens't open my program?
do I need to set a sub or somthing in my program, so when it's opened by the a file being clicked that it puts the file data into the correct places?
Pirate
Feb 20th, 2003, 11:35 AM
Originally posted by §tudz
I already have this code, and I have done that, but it doens't open my program?
do I need to set a sub or somthing in my program, so when it's opened by the a file being clicked that it puts the file data into the correct places?
Let's say :
after you finish working on a file within your app , you must save it then. When you try to run it , the registry is aware of what app can recognize this file(if you set up this routine in the registery).Now,you need to build a method that reads file content and open the appropriate workspace(actually it depends on what sort your app is).I've tried this once .I created a game that saves where the user has stopped .Then run the main app and open the file and reads the content(it's long method).
vbforums.com
Copyright Internet.com Inc., All Rights Reserved.