By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,655 Members | 1,875 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,655 IT Pros & Developers. It's quick & easy.

opening an .mdb file using your own application

P: n/a
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 :)

Nov 21 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
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" <ed****@discussions.microsoft.com>
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 :)

Nov 21 '05 #2

P: n/a
"edgarc" <ed****@discussions.microsoft.com> schrieb:
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
///

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>
Nov 21 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.