.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
268 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  

Forma Design Contest


Autodesk Design & Make Report