Click here to Skip to main content
15,923,015 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralIntelligent graphic image analysis and comparison Pin
tempgp11-Apr-05 12:02
tempgp11-Apr-05 12:02 
QuestionCan someone please Help! Pin
joseuri2111-Apr-05 11:15
joseuri2111-Apr-05 11:15 
AnswerRe: Can someone please Help! Pin
vertig073011-Apr-05 13:08
vertig073011-Apr-05 13:08 
AnswerRe: Can someone please Help! Pin
Dave Kreskowiak11-Apr-05 16:48
mveDave Kreskowiak11-Apr-05 16:48 
GeneralShellExecute API Pin
Lisana11-Apr-05 10:26
Lisana11-Apr-05 10:26 
GeneralRe: ShellExecute API Pin
shinay11-Apr-05 10:49
shinay11-Apr-05 10:49 
GeneralRe: ShellExecute API Pin
Lisana11-Apr-05 11:01
Lisana11-Apr-05 11:01 
GeneralRe: ShellExecute API Pin
shinay11-Apr-05 11:12
shinay11-Apr-05 11:12 
Can you just create a new project with VB and copy & paste the following code.
In the form, you just add one button called "Command1"(by default).
Compile and run. it should work.

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

Public Sub RunProgram(ByVal strProgram As String)
Dim lRet As Long
lRet = ShellExecute(vbNull, "Open", strProgram, "", "", 1)
If lRet <= 32 Then
MsgBox ("Error Running Program")
End If
End Sub




Private Sub Command1_Click()
RunProgram "c:\windows\system32\notepad.exe"
End Sub
GeneralRe: ShellExecute API Pin
shinay11-Apr-05 11:14
shinay11-Apr-05 11:14 
GeneralRe: ShellExecute API Pin
Lisana11-Apr-05 11:22
Lisana11-Apr-05 11:22 
GeneralRe: ShellExecute API Pin
shinay11-Apr-05 11:27
shinay11-Apr-05 11:27 
GeneralRe: ShellExecute API Pin
Lisana11-Apr-05 11:28
Lisana11-Apr-05 11:28 
GeneralRe: ShellExecute API Pin
shinay11-Apr-05 11:30
shinay11-Apr-05 11:30 
GeneralRe: ShellExecute API Pin
Lisana11-Apr-05 11:33
Lisana11-Apr-05 11:33 
GeneralRe: ShellExecute API Pin
Mitch F.11-Apr-05 11:32
Mitch F.11-Apr-05 11:32 
GeneralRe: ShellExecute API Pin
Lisana11-Apr-05 11:40
Lisana11-Apr-05 11:40 
General.NET Packaging Pin
Hassanur11-Apr-05 9:33
Hassanur11-Apr-05 9:33 
GeneralRe: .NET Packaging Pin
Dave Kreskowiak11-Apr-05 9:38
mveDave Kreskowiak11-Apr-05 9:38 
GeneralRe: .NET Packaging Pin
Hassanur11-Apr-05 10:46
Hassanur11-Apr-05 10:46 
GeneralFormatting a string Pin
KreativeKai11-Apr-05 7:40
professionalKreativeKai11-Apr-05 7:40 
GeneralRe: Formatting a string Pin
Mitch F.11-Apr-05 7:51
Mitch F.11-Apr-05 7:51 
GeneralRe: Formatting a string Pin
KreativeKai11-Apr-05 8:01
professionalKreativeKai11-Apr-05 8:01 
GeneralRe: Formatting a string Pin
Jim Matthews11-Apr-05 16:56
Jim Matthews11-Apr-05 16:56 
GeneralRe: Formatting a string Pin
KreativeKai12-Apr-05 1:32
professionalKreativeKai12-Apr-05 1:32 
GeneralSaving Pin
ADY00711-Apr-05 7:21
ADY00711-Apr-05 7:21 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.