.NET
cancel
Showing results forĀ 
ShowĀ Ā onlyĀ  | Search instead forĀ 
Did you mean:Ā 

Cancel Close command

0 REPLIES 0
Reply
Message 1 of 1
Anonymous
244 Views, 0 Replies

Cancel Close command

Hi
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)
Case MsgBoxResult.Yes
AcadDoc.Save()
Case MsgBoxResult.No
'need to suppress the save here
Case ElseĀ“
'I attempt to do it with the instruction bellow, but it does not work
AcadDoc.SendCommand("(command)")

End Select

End If
End If
End If
End Sub


I will appreciate any help

Regards

Raul Tejada
0 REPLIES 0

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk DevCon in Munich May 28-29th


Autodesk Design & Make Report

ā€Boost