I am looking to cancel the close command, I know what you are thinking, setting the variable Cancel to true on the Close event handler.
The problem is I need to cancel the close command right after it begins, the reason for it is to cancel a posible AutoCAD "Save" dialog. I need to replaced it by a customized version. This is what I have.
Private Sub AcadDoc_BeginCommand(ByVal CommandName As String) Handles AcadDoc.BeginCommand
If CommandName = "CLOSE" Then
If AcadDoc.Saved = False Then
'this is where I replaced the Save dialog box
Select Case msgbox ("My dialog box selections",MsgBoxStyle.YesNoCancel)
'need to suppress the save here
'I attempt to do it with the instruction bellow, but it does not work