G
Guest
Does ShellExecute work in VB2005? I am trying to open a pdf with a button - I
get no errors, but nothing is happening. Here is my code:
Option Explicit On
Public Class frmPROTest
Const SW_SHOWNORMAL = 1
Dim hwnd
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
Private Sub PDF_Click()
Call ShellExecute(Me.hwnd, "open", "S:\Users\JJolly\PRO
CD\pdf\english\ESY Book.pdf", "", 0, SW_SHOWNORMAL)
End Sub
End Class
Thanks for any help.
get no errors, but nothing is happening. Here is my code:
Option Explicit On
Public Class frmPROTest
Const SW_SHOWNORMAL = 1
Dim hwnd
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
Private Sub PDF_Click()
Call ShellExecute(Me.hwnd, "open", "S:\Users\JJolly\PRO
CD\pdf\english\ESY Book.pdf", "", 0, SW_SHOWNORMAL)
End Sub
End Class
Thanks for any help.