Results 1 to 5 of 5

Thread: file associations

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Oct 1999
    Location
    chicago (hope)
    Posts
    146

    Unhappy

    i know how to create associations!!!!

    but i don't know how to open the file, the user clicked on, because i don't know the code for getting the file name....

    *crying for help*


  2. #2
    Fanatic Member Dim's Avatar
    Join Date
    Jul 2000
    Posts
    620
    I'm not quite sure what you mean but...
    If you are using a file list box then.
    Text1.Text = File1.FileName
    will give you the file name in the textbox..
    And if you are using a commondialog control then it should open the file when the user selects it...

    Hope that helped,
    D!m
    Dim

  3. #3
    Frenzied Member Mark Sreeves's Avatar
    Join Date
    Nov 1999
    Location
    UK
    Posts
    1,845

    In your program you need to read the filename from the command line using Command()

    Code:
    Private Sub Form_Load()
    Dim strFilename As String
    
    strFilename = Command()
    'now do whatever you want with it.
    
    
    End Sub

    Mark
    -------------------

  4. #4

    Thread Starter
    Addicted Member
    Join Date
    Oct 1999
    Location
    chicago (hope)
    Posts
    146
    ok, i'll explain step by step....

    1. open the explorer

    2. click on a .cra file

    3. my app opens

    4. but my app can't open the file simultaniously because i don't know how.....



    i hope, now it's clear, what i mean....


  5. #5
    Addicted Member
    Join Date
    Jul 2000
    Location
    Scotland
    Posts
    184
    Don't know if this helps, but........

    Open Explorer,

    Goto View/Folder Options,

    Open File Types Tab

    A) New Type if it's not registered.
    B) Edit to allow OPEN

    This should set up file associations to allow the file to open in the correct application when double-clicked in Explorer.

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