|
|
|
|
|
Dicas
|
|
Visual Basic (ActiveX/Controles/DLL)
|
|
|
Título da Dica: Abrir arquivo no programa de origem pelo VB
|
|
|
|
Postada em 15/2/2008 por Fernando
fernando@shift.com.br
'Em um modulo adicione o codigo abaixo
#If Win32 Then Public 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 #Else Public Declare Function ShellExecute Lib _ "shell.dll" _ (ByVal hwnd As Integer, _ ByVal lpOperation As String, _ ByVal lpFile As String, _ ByVal lpParameters As String, _ ByVal lpDirectory As String, _ ByVal nShowCmd As Integer) As Integer #End If Public Const SW_SHOWNORMAL = 1
' No form
Dim iret As Long iret = ShellExecute(Me.hwnd, vbNullString, "C:Doc1.doc" , vbNullString, "C:", SW_SHOWNORMAL)
'facil facil
|
|
|
|
|