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*
Printable View
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*
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
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
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....
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.