Results 1 to 9 of 9

Thread: File association Public Sub

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Jul 2001
    Location
    UK
    Posts
    271

    Question File association Public Sub

    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
    §tudz

    Studzworld.com - Portfolio

  2. #2
    Sleep mode
    Join Date
    Aug 2002
    Location
    RUH
    Posts
    8,083

  3. #3
    Hyperactive Member RealNickyDude's Avatar
    Join Date
    Nov 2002
    Location
    Watching you through the hidden camera :o
    Posts
    435
    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"
    [vbcode]
    On Error GoTo Hell
    [/vbcode]:¬) Nicky : Why not try VBCodebook.NET.

  4. #4
    Sleep mode
    Join Date
    Aug 2002
    Location
    RUH
    Posts
    8,083
    the API would will do this Nicky .I am looking for .NET way.

  5. #5
    Sleep mode
    Join Date
    Aug 2002
    Location
    RUH
    Posts
    8,083
    another API

  6. #6
    Hyperactive Member RealNickyDude's Avatar
    Join Date
    Nov 2002
    Location
    Watching you through the hidden camera :o
    Posts
    435
    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?
    [vbcode]
    On Error GoTo Hell
    [/vbcode]:¬) Nicky : Why not try VBCodebook.NET.

  7. #7
    Sleep mode
    Join Date
    Aug 2002
    Location
    RUH
    Posts
    8,083
    I think it's possible . 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.

  8. #8

    Thread Starter
    Hyperactive Member
    Join Date
    Jul 2001
    Location
    UK
    Posts
    271
    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?
    §tudz

    Studzworld.com - Portfolio

  9. #9
    Sleep mode
    Join Date
    Aug 2002
    Location
    RUH
    Posts
    8,083
    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).

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width