Associating a file extension to an application

M

MJB

I have an application that understands a proprietary format and file
extension. I can associate the file to my application using the windows
'Open With' dialog, but I want my application to automatically load the
file when opening it. What is the proper way to do this? An example of
how to pass the file to my application would be great.

Thanks,
Matt
 
H

Herfried K. Wagner [MVP]

MJB said:
I have an application that understands a proprietary format and file
extension. I can associate the file to my application using the windows
'Open With' dialog, but I want my application to automatically load the
file when opening it. What is the proper way to do this? An example of
how to pass the file to my application would be great.

<URL:http://www.mentalis.org/soft/class.qpx?id=5>

The filename will be passed to the executable in a command line parameter:

\\\
Public Module Program
Public Function Main(ByVal Args() As String) As Integer
For Each Arg As String In Args
MsgBox(Arg)
Next Arg
Application.Run(...)
End Function
End Module
///

Select 'Sub Main' as startup object in the project properties.
 
M

MJB

Thanks Herfried and all who responded.

<URL:http://www.mentalis.org/soft/class.qpx?id=5>

The filename will be passed to the executable in a command line parameter:

\\\
Public Module Program
Public Function Main(ByVal Args() As String) As Integer
For Each Arg As String In Args
MsgBox(Arg)
Next Arg
Application.Run(...)
End Function
End Module
///

Select 'Sub Main' as startup object in the project properties.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top