HighTechTalks DotNet Forums  

Going from .NET to VB6 (Downgrade)

VB.net Upgrade microsoft.public.dotnet.languages.vb.upgrade


Discuss Going from .NET to VB6 (Downgrade) in the VB.net Upgrade forum.



Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old   
jduarte
 
Posts: n/a

Default Going from .NET to VB6 (Downgrade) - 08-17-2006 , 02: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

p.Start()

System.Threading.Thread.Sleep(265)

p.Kill()
"

Reply With Quote
  #2  
Old   
Ken Halter
 
Posts: n/a

Default Re: Going from .NET to VB6 (Downgrade) - 08-17-2006 , 04:12 PM






"jduarte" <jduarte (AT) discussions (DOT) microsoft.com> wrote

Quote:
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

Didn't like my answer in the VB6 groups?

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,
automatically.

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




Reply With Quote
  #3  
Old   
GhostInAK
 
Posts: n/a

Default Re: Going from .NET to VB6 (Downgrade) - 08-20-2006 , 01:57 PM



Hello jduarte,

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.

-Boo

Quote:
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

p.Start()

System.Threading.Thread.Sleep(265)

p.Kill()
"



Reply With Quote
  #4  
Old   
Theo Verweij
 
Posts: n/a

Default Re: Going from .NET to VB6 (Downgrade) - 08-25-2006 , 04:32 PM



I agree.
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
framework.

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)
Sleep 265
TerminateProcess hProcess, ExitCode
CloseHandle process_handle



GhostInAK wrote:
Quote:
Hello jduarte,

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.

-Boo

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

p.Start()

System.Threading.Thread.Sleep(265)

p.Kill()
"



Reply With Quote
Reply




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.