Well, I'll be .. I was going to suggest that you try the accellerators, but I couldn't remember if it worked for the F1 key .. there was some issues some time ago on older versions ....
Anyway, I have developed a simple little VBA program that turns off the F1 key (or any key for that matter) in the AutoCAD window. All you need to do is supply the ASCII code of the key to turn off...
Option Explicit
Private Declare Function FindWindow Lib "User32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long
Private Declare Function GetCurrentVbaProject Lib "vba332.dll" Alias "EbGetExecutingProj" (hProject As Long) As Long
Private Declare Function GetFuncID Lib "vba332.dll" Alias "TipGetFunctionId" (ByVal hProject As Long, ByVal strFunctionName As String, ByRef strFunctionId As String) As Long
Private Declare Function GetAddr Lib "vba332.dll" Alias "TipGetLpfnOfFunctionId" (ByVal hProject As Long, ByVal strFunctionId As String, ByRef lpfn As Long) As Long
Private Declare Function GlobalAddAtom Lib "kernel32" Alias "GlobalAddAtomA" (ByVal lpString As String) As Long
Private Declare Function GlobalDeleteAtom Lib "kernel32" (ByVal nAtom As Long) As Long
Private Declare Function RegisterHotKey Lib "User32" (ByVal hWND As Long, ByVal id As Long, ByVal fsModifiers As Long, ByVal vk As Long) As Long
Private Declare Function UnregisterHotKey Lib "User32" (ByVal hWND As Long, ByVal id As Long) As Long
Private Sub CreateHotKey(ByVal intKeyCode As Integer, ByVal hWND As Long)
Dim mlngAtom As Long
mlngAtom = GlobalAddAtom(CStr(Now))
RegisterHotKey hWND, mlngAtom, 0, intKeyCode
End Sub
Private Sub DestroyHotKey(ByVal hWND As Long)
UnregisterHotKey hWND, GlobalDeleteAtom(mlngAtom)
End Sub
Public Sub TurnOff()
'replace vbKeyF1 with the ascii code of the key to turn off or the vbKey equivalent
CreateHotKey vbKeyF1, FindAutoCAD
MsgBox "F1 is now disabled"
End Sub
Private Function MyAddressOf(sFuncName As String) As Long
Dim lResult As Long
Dim lHproject As Long
Dim sFuncID As String
Dim lFuncPtr As Long
Dim sFuncNameUnicode As String
sFuncNameUnicode = StrConv(sFuncName, vbUnicode)
Call GetCurrentVbaProject(lHproject)
If lHproject <> 0 Then
lResult = GetFuncID(lHproject, sFuncNameUnicode, sFuncID)
If lResult = NO_ERROR Then
lResult = GetAddr(lHproject, sFuncID, lFuncPtr)
If lResult = NO_ERROR Then
MyAddressOf = lFuncPtr
End If
End If
End If
End Function
Private Function FindAutoCAD() As Long
FindAutoCAD = FindWindow(vbNullString, Application.Caption)
End Function