Everything works fine, just like it should, but after it runs I lose my Map_MouseMove events. I tried Map.refresh but that had not affect. I have other Map_KeyPress events and they work fine. Only after I added this code do I lose my mouse move.
If e.KeyChar = "R" Or _
e.KeyChar = "r" Then
If ROWDoc <> "UNK" Then
If ROWMsg = False Then
MessageBox.Show("Please note that the following Right of Way documents are for reference only." & Environment.NewLine & _
"Any interpretation of Right of Way/Easement documents shall be performed by the Right of Way Dept.", Environment.NewLine)
ROWMsg = True
End If
If Directory.Exists("\\ROW IMAGES\") Then
argstr = "\\ROW IMAGES" & ROWDoc
If Directory.Exists(argstr & " (hard files match images)") Then
argstr = argstr & " (hard files match images)"
End If
If ROWDoc.Length > 4 Then
If ROWDoc.Substring(ROWDoc.Length - 4, 4) <> ".PDF" Then
'strROWPth = Left(strROWPth, Len(strROWPth) - 1)
'Me.Cursor = Cursors.WaitCursor
'Debug.Print strA3
If argstr <> "" Then System.Diagnostics.Process.Start("C:\Windows\Explorer.exe", argstr)
'Me.Cursor = Cursors.Default
Else
If RegKeyAdobe <> "" Then
'Debug.Print strROWPth & strROW
If File.Exists(argstr) Then
If argstr <> "" Then System.Diagnostics.Process.Start(RegKeyIExplore, argstr)
Else
MessageBox.Show(ROWDoc & " was not found on our server." & Environment.NewLine & _
"Please contact me for further assistance.", Environment.NewLine)
End If
Else
Dim MSG As String = "No recognizable versions of Adobe Acrobat were found on your PC." & Environment.NewLine & _
"Would you like to install the latest version of Adobe Acrobat Reader?"
Dim caption As String = "Adobe Error!"
Dim result = MessageBox.Show(MSG, caption, MessageBoxButtons.YesNo, MessageBoxIcon.Question)
If (result = Forms.DialogResult.Yes) Then
System.Diagnostics.Process.Start(RegKeyIExplore, "HTTP://get.adobe.com/reader/")
End If
End If
End If
End If
Else
MessageBox.Show("Sorry, you must be connected to the local domain to view the Right-of-Way documents." & Environment.NewLine & _
"Please contact your system administrator for possible solutions to this issue.", "Network Error!", MessageBoxButtons.OK)
End If
Else
MessageBox.Show("No documents are available for this segment at this time.", "Document Error!", MessageBoxButtons.OK)
End If
End If
Map.MapFocusMode = MapFocusMode.MouseEnterFocused