1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
| 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 Const SW_SHOWNORMAL = 1
Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = vbKeyF1 Then
ShellExecute Me.hwnd, vbNullString, "C:\MonHelp.chm", vbNullString, "c:\", SW_SHOWNORMAL
End If
End Sub
Private Sub Form_Load()
Me.KeyPreview = True
End Sub |
Partager