Going from .NET to VB6 (Downgrade) - 08-17-2006 , 03:45 PM
I know it seams stupid but i have to do this because many people don't have
..net framework 2.0 in portugal and this is an aplication to launch from cd
I have this code i'd like to reproduce in VB6 i tried the shell() command
but it's not enough, could anyone help me?
Dim MyProgName As String = "pangar.exe"
Dim p As New Process
p.StartInfo.FileName = "cmd.exe"
p.StartInfo.WorkingDirectory = ("")
p.StartInfo.Arguments = "/k " & MyProgName
Re: Going from .NET to VB6 (Downgrade) - 08-17-2006 , 05:12 PM
"jduarte" <jduarte (AT) discussions (DOT) microsoft.com> wrote
You should learn to crosspost instead of multipost. That way, my answer
would show in this group, and all other groups in the crosspost list,
It works out much better for everyone involved.
Ken Halter - MS-MVP-VB (visiting from VB6 world) - http://www.vbsight.com
Please keep all discussions in the groups..
In Loving Memory - http://www.vbsight.com/Remembrance.htm
Re: Going from .NET to VB6 (Downgrade) - 08-20-2006 , 02:57 PM
You could include the .NET 2.0 framework installer on the CD. You could
even write a small bootstrap program (in VB6 or Delphi or C/++) to determine
if the framework is available, and if not, install it.. if it is available,
launch the app instead.
Re: Going from .NET to VB6 (Downgrade) - 08-25-2006 , 05:32 PM
Not that a) vista and longhorn will be shipped with .net 2.0 installed
and b) almost all next versions of microsoft programs will need the
But, if you want vb6, you'll have it:
Private Declare Function OpenProcess _
Lib "kernel32" (ByVal dwDesiredAccess As Long, _
ByVal bInheritHandle As Long, _
ByVal dwProcessId As Long) As Long
Public Declare Sub Sleep
Lib "kernel32" (ByVal dwMilliseconds As Long)
Private Declare Function TerminateProcess _
Lib "kernel32" (ByVal hProcess As Long, _
ByVal uExitCode As Long) As Long
Private Declare Function CloseHandle _
Lib "kernel32" (ByVal hObject As Long) As Long
Dim process_id As Long
Dim process_handle As Long
process_id = Shell("cmd.exe /kpangar.exe")
process_handle = OpenProcess(SYNCHRONIZE, 0, process_id)
TerminateProcess hProcess, ExitCode
|Thread Tools||Search this Thread|