Tema: Abrir PDF
Ver Mensaje Individual
  #5 (permalink)  
Antiguo 04/03/2004, 10:06
Avatar de HiTek
HiTek
 
Fecha de Ingreso: noviembre-2003
Ubicación: LF, Santiago.Chile
Mensajes: 217
Antigüedad: 23 años
Puntos: 0
Código PHP:
Private Sub Command1_Click()
    
Call AbrePDF("test.pdf")
End Sub

Sub AbrePDF
(MiArchivoPDF As String)
    
RetVal = ShellExecute(Me.hWnd, vbNullString, MiArchivoPDF, vbNullString, App.Path & "\", SW_SHOWMAXIMIZED)
    RetVal = ShellExecute(Me.hWnd, vbNullString, MiArchivoPDF, vbNullString, App.Path & "", SW_SHOWMAXIMIZED)
    Form1.Caption = RetVal
    If RetVal = 2 Then
        MsgBox "
Archivo de ayuda No encontrado en la ruta.", vbExclamation, "Error de carga"
    End If
    If RetVal = 31 Then
        MsgBox "
Falta instalar Acrobat Reader, imposible abrir el documento.", vbExclamation, "Error de carga"
    End If
End Sub 
y en un modulo esto
Código PHP:
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