|
|
|
|
|
Dicas
|
|
Visual Basic (ActiveX/Controles/DLL)
|
|
|
Título da Dica: Abrir executável pelo atalho
|
|
|
|
Postada em 24/9/2004 por Josefh Hennyere
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 conSwNormal = 1
Private Sub Form_Load() On Error Resume Next 'Caso o programa não seja aberto, significa que o caminho do atalho está inválido ShellExecute hWnd, "open", "C:Programa.lnk", vbNullString, vbNullString, conSwNormal End Sub
'Josefh Hennyere
|
|
|
|
|