Closing Event - .NET

<< Click to Display Table of Contents >>

Navigation:  Events Generated by the .NET Control >

Closing Event - .NET

Previous pageReturn to chapter overviewNext page

[Not supported by VpeWebControl]

VPE requests confirmation from your application, if the preview can be closed.

CancelEventHandler VPE.Closing(

object sender,

System.ComponentModel.CancelEventArgs e

)

object sender

the VPE document object that fired the event

System.ComponentModel.CancelEventArgs e

event data, see .NET documentation

You can set e.Cancel = true if you want to cancel the event, i.e. deny that the preview is closed

Example:

Protected Sub vpe_Closing(sender As Object, e As CancelEventArgs)

 If Not myDataIsSaved Then

         e.Cancel = True

         MessageBox.Show("You must save first.")

 Else

         e.Cancel = False

         MessageBox.Show("Goodbye.")

 End If

End Sub 'vpe_Closing