' Copyright 2008 ESRI
'
' All rights reserved under the copyright laws of the United States
' and applicable international laws, treaties, and conventions.
'
' You may freely redistribute and use this sample code, with or
' without modification, provided you include the original copyright
' notice and use restrictions.
'
' See use restrictions at <your ArcGIS install location>/developerkit/userestrictions.txt.
'
Option Explicit
Private Const MODULE_NAME As String = "frmKeys.frm"
Public Sub Init()
On Error GoTo ErrorHandler
'-----------------------
' Set Modular Variables
'-----------------------
'
'-----------
' Load Form
'-----------
Load Me
'--------------
' Display Form
'--------------
Me.Show vbModal
'
Exit Sub
ErrorHandler:
Call HandleError(False, "Init " & MODULE_NAME & " (" & CStr(Erl) & ")", Err.Number, Err.Source, Err.Description)
End Sub
Private Sub Form_Load()
On Error GoTo ErrorHandler
'
Me.CAPTION = "GN Editor Keys"
'
Exit Sub
ErrorHandler:
Call HandleError(True, "Form_Load " & MODULE_NAME & " (" & CStr(Erl) & ")", Err.Number, Err.Source, Err.Description)
End Sub
Private Sub Form_Unload(Cancel As Integer)
On Error GoTo ErrorHandler
'-------------------------
' Clear modular variables
'-------------------------
'
Exit Sub
ErrorHandler:
Call HandleError(True, "Form_Unload " & MODULE_NAME & " (" & CStr(Erl) & ")", Err.Number, Err.Source, Err.Description)
End Sub
Private Sub cmdClose_Click()
On Error GoTo ErrorHandler
'
Unload Me
'
Exit Sub
ErrorHandler:
Call HandleError(True, "cmdClose_Click " & MODULE_NAME & " (" & CStr(Erl) & ")", Err.Number, Err.Source, Err.Description)
End Sub
Private Sub cmdMoreHelp_Click()
On Error GoTo ErrorHandler
'
Dim pFSO As Scripting.FileSystemObject
Dim pFolder As Scripting.Folder
Dim pHelpLocation As String
'
Set pFSO = New Scripting.FileSystemObject
'
Set pFolder = pFSO.GetFolder(App.Path)
Set pFolder = pFolder.ParentFolder
'
If pFSO.FolderExists(pFSO.BuildPath(pFolder.Path, HELP_FOLDER)) Then
Set pFolder = pFSO.GetFolder(pFSO.BuildPath(pFolder.Path, HELP_FOLDER))
'
If pFSO.FileExists(pFSO.BuildPath(pFolder.Path, HELP_FILE)) Then
Call modCommon.SubmitFileToOS(pFSO.BuildPath(pFolder.Path, HELP_FILE))
Else
Call MsgBox("Error: Help file is missing from:" & vbCrLf & _
App.Path & "\" & HELP_FOLDER & " \ " & HELP_FILE)
End If
Else
Call MsgBox("Error: Help file is missing from:" & vbCrLf & _
App.Path & "\" & HELP_FOLDER & " \ " & HELP_FILE)
End If
'
Exit Sub
ErrorHandler:
Call HandleError(True, "cmdMoreHelp_Click " & MODULE_NAME & " (" & CStr(Erl) & ")", Err.Number, Err.Source, Err.Description)
End Sub