Computing.Net > Forums > Programming > Visual Basic shell command or run

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

Visual Basic shell command or run

Reply to Message Icon

Name: gooter005
Date: November 29, 2006 at 17:20:56 Pacific
OS: XP Home
CPU/Ram: amd xp 2600 333, 384 DDr
Comment:

Ok i want to beable to use the shell command to start gens.exe (sega emulator) and load a game automaticly all from one line of code.

Edog



Sponsored Link
Ads by Google

Response Number 1
Name: Chi Happens
Date: November 30, 2006 at 04:44:46 Pacific
Reply:

Use the Win32 API called ShellExecute:

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
Const SW_SHOW = 5

ShellExecute 0,"OPEN","gens.exe","gamename","C:\Path To gens.exe", SW_SHOW

Enjoy,
Chi Happens
They mostly come at night...mostly.


0
Reply to Message Icon

Related Posts

See More







Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Programming Forum Home


Sponsored links

Ads by Google


Results for: Visual Basic shell command or run

Visual Basic copy command? www.computing.net/answers/programming/visual-basic-copy-command/15232.html

Visual Basic www.computing.net/answers/programming/visual-basic/54.html

Visual Basic: Save input www.computing.net/answers/programming/visual-basic-save-input/11120.html