Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Visual Basic > VB.NET 1.0 > VB.NET 2002/2003 Basics
|
VB.NET 2002/2003 Basics For coders who are new to Visual Basic, working in .NET versions 2002 or 2003 (1.0 and 1.1).
Welcome to the p2p.wrox.com Forums.

You are currently viewing the VB.NET 2002/2003 Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old July 31st, 2008, 01:45 AM
Registered User
 
Join Date: Jul 2008
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default How to call an External program to run ?

Hi
How can i call an external program to run and i dont have to wait for the Return Value
The vb code run and when the External prog. will finish its result will influence the vb code (But no wait Something like multithreading)

Here an Example :
Code:
Sub msg1() 
        Dim x As String 
        x = "Im First Thread" 
        MsgBox(x) 
    End Sub 


Sub msg2() 
        Dim y As String 
        y = "Im Second Thread" 
        MsgBox(y) 
    End Sub 

Sub msg3() 
        Dim z As String 
        z = "Im Third Thread" 
        MsgBox(z) 
    End Sub 

Sub msg4() 
        Dim s As String 
        s = "Im Fourth Thread" 
        MsgBox(s) 
    End Sub 

        Dim thread1 As Thread 
        Dim thread2 As Thread 
        Dim thread3 As Thread 
        Dim thread4 As Thread 

        thread1 = New Thread(AddressOf msg1) 
        thread2 = New Thread(AddressOf msg2) 
        thread3 = New Thread(AddressOf msg3) 
        thread4 = New Thread(AddressOf msg4) 


        thread1.Start() 
        thread2.Start() 
        thread3.Start() 
        thread4.Start() 
Shell("c:\windows\notepad.exe")





Similar Threads
Thread Thread Starter Forum Replies Last Post
call external program from vb.net praswani Pro VB.NET 2002/2003 2 October 18th, 2007 07:19 AM
Urgent:How to call the external function ivanlaw Javascript 6 October 16th, 2007 12:16 AM
i can not run external program. pumpui VS.NET 2002/2003 0 December 5th, 2004 02:08 PM
how to call an external program? schockp Oracle 2 November 13th, 2003 07:41 AM
Executing an external program. saint VB.NET 2002/2003 Basics 3 July 22nd, 2003 08:30 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.