i have a program written in vc++. I would like to call the same program in vb6.0
parse27
08-30-02, 10:20 AM
you can try looking at the "shell" keyword of VB6..runs an exe file.
or if you want to use the API use the following code below:
'<---THIS SHOULD BE IN THE GENERAL DECLARATION SECTION--->
Private 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
Public pcsi As String
'<---THIS MAY BE PLACED IN THE FORM--->
Dim sWorkDir As String
Dim sFile As String
Dim sCommand As String
sWorkDir = App.Path 'working directory
sFile = App.Path + "\help\help.html" ' file to execute
sCommand = vbNullString 'command line parameters
ShellExecute hwnd, "open", sFile, sCommand, sWorkDir, 1
i hope this helps and answers your question..
vBulletin® v3.7.3, Copyright ©2000-2008, Jelsoft Enterprises Ltd.