Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Launching exe's

0 views
Skip to first unread message

Robert Bull

unread,
Dec 30, 1999, 3:00:00 AM12/30/99
to
As a new user of visual basic, could somebody please tell me how to
launch external exe files from within my VB program.

Regards

Robert Bull
bullr...@hotmail.com


M.Kondo

unread,
Jan 2, 2000, 3:00:00 AM1/2/00
to
"Robert Bull" <r...@robert-bull.co.uk> wrote in message
news:386AA8D5...@robert-bull.co.uk...

> As a new user of visual basic, could somebody please tell me how to
> launch external exe files from within my VB program.

WinExec API ,a piece of Win32API is useful .
I show you a sample code as follows.
(VB6.0 and Windows98 are installed in my PC.)

'The declaration of Win32API

Private Declare Function WinExec Lib "kernel32" Alias "WinExec" _
(ByVal lpCmdLine As String, ByVal nCmdShow As Long) As Long
.

Private Sub Command1_Click()
'If you click a Command1 button,"Calc.exe" will be launched
Const SW_NORMAL = 1
Call WinExec("c:\windows\calc.exe", SW_NORMAL)
End sub


--
------------------------------
KONDO , Makoto
m_k...@msc.biglobe.ne.jp
------------------------------


0 new messages