Visual Basic

Status
This thread has been Locked and is not open to further replies. Please start a New Thread if you're having a similar issue. View our Welcome Guide to learn how to use this site.

computerdumb002

Thread Starter
Joined
Mar 4, 2008
Messages
34
Hi, can anyone show me code that i can apply to a button in Visual Basic to open up a program, i am having trouble... Thanks in advance (Y)
 
Joined
Apr 6, 2008
Messages
5
Use Visual Basic's Shell Function as shown in above post.

Shell Application_Path_and_File, [Application Windo Style]

Shell "c:\windows\system32\cmd.exe" , vbNormalFocus

Or use Windows APIs:
SheExecute:

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_SHOWNORMAL = 1
Private Sub Form_Load()
ShellExecute Me.hwnd, vbNullString, "mailto:[email protected]", vbNullString, "C:\", SW_SHOWNORMAL
End Sub

if you want to open a document, Open FindExecutable, ShellExecute or ShellExecuteEx
Fore more details, Have a download of API Guide
http://www.freevbcode.com/ShowCode.asp?ID=7073
 
Status
This thread has been Locked and is not open to further replies. Please start a New Thread if you're having a similar issue. View our Welcome Guide to learn how to use this site.

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 807,865 other people just like you!

Latest posts

Members online

Top