Hi there,
I would like to know if it's possible to open a third party application from VB.
I have a form and a button. On click of the button, I would like to be able to open up an application (for example Drawme).
Thanks in advance.
Printable View
Hi there,
I would like to know if it's possible to open a third party application from VB.
I have a form and a button. On click of the button, I would like to be able to open up an application (for example Drawme).
Thanks in advance.
Shell "programname.exe"
Yep that's true, use this code if you want to open a file with it's default program (even urls!)
have funCode:Public Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" (ByVal hWnd As Long, ByVal lpOperation As String, ByVal lpFile As String, ByVal lpParameters As String, ByVal lpDirectory As String, ByVal nShowCmd As Long) As Long
'Open a file with it's default program
Public Sub Execute(file As String)
ShellExecute(hWnd, "Open", file, "", "", vbNormalFocus)
End Sub
'Usage
'Call Execute("c:\Drawme.drw")
Or if you want to open a file with a specific program, use the Shell method and pass the file for the command line argument.
Code:Shell "Notepad.exe MyFile.txt", 1