opening an .mdb file using your own application

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi, i have an application that opens .mdb file. I open it by the usual File >
Open command and then this event will call a function called OpenFile().

What i want now to happen now is that when i right-click on the .mdb file in
windows explorer and open it with my application, it will mimic my File >
Open command.
How do i do this?

Currently what happens when i right click on the mdb file, my app just
launches but doesn't actually open the file.

I'm using vb.net.

Thanks in advance :)
 
Edgarc,

What do you mean with open, there are not much "openfile" and in my opinion
don't they do what you want. Guessing, is probobly what you need process
start

Here a sample of that.
\\\
Dim p As New Process
Dim pi As New ProcessStartInfo
pi.arguments = "c:\windows\win.ini"
pi.FileName = "notepad.exe"
p.startinfo = pi
p.Start()
///
I hope this helps?

Cor
 
edgarc said:
What i want now to happen now is that when i right-click on the .mdb file
in
windows explorer and open it with my application, it will mimic my File >
Open command.
How do i do this?

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

\\\
Public Module Program
Public Sub Main(ByVal Args() As String)
If Args.Length > 0 Then

' 'Args' is a string array that contains the command line
' parameters' values.
OpenTheFile(Args(0))
End If
End Sub
End Module
///
 

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

Back
Top