Does anyone ehere knows how to disable keyboards keys (e.g. delete key, enter key, spacebar key) once autocad load.
Thanks and regards,
Solved! Go to Solution.
Here is the code I got from reading an article from dev blog but I forgot the link.
Public Class CErase
Public Overrides Sub [Erase](dbObject As DBObject, erasing As Boolean)
Throw New Autodesk.AutoCAD.Runtime.Exception(ErrorStatus.Not
Shared objEraseOverRule As EraseOverrule = Nothing
Public Shared Sub PreventErase()
Dim ed As Editor = Application.DocumentManager.MdiActiveDocument.Edit
If objEraseOverRule Is Nothing Then
objEraseOverRule = New EraseOverrule()
ObjectOverrule.Overruling = True
objEraseOverRule = Nothing
Log into access your profile, ask and answer questions, share ideas and more. Haven't signed up yet? Register