Reference Guide
GdPicture14 Namespace / GdViewer Class / BeforeDocumentClosed Event
Example





In This Topic
    BeforeDocumentClosed Event (GdViewer)
    In This Topic
    This event is raised right before the currently displayed document is to be closed in the GdViewer control.

    Please check the corresponded GdViewer.BeforeDocumentClosedEventHandler for more details.

    Syntax
    'Declaration
     
    
    Public Event BeforeDocumentClosed As GdViewer.BeforeDocumentClosedEventHandler
    public event GdViewer.BeforeDocumentClosedEventHandler BeforeDocumentClosed
    public event BeforeDocumentClosed: GdViewer.BeforeDocumentClosedEventHandler; 
    In JScript, you can handle the events defined by another class, but you cannot define your own.
    public: __event GdViewer.BeforeDocumentClosedEventHandler* BeforeDocumentClosed
    public:
    event GdViewer.BeforeDocumentClosedEventHandler^ BeforeDocumentClosed
    Example
    How to add this event to your GdViewer control.
    'We assume that the GdViewer1 control has been properly integrated.
    Friend WithEvents GdViewer1 As GdPicture14.GdViewer
                
    'Add the event.
    AddHandler GdViewer1.BeforeDocumentClosed, AddressOf GdViewer1_BeforeDocumentClosed
                
    'Define the event.
    Sub GdViewer1_BeforeDocumentClosed() Handles GdViewer1.BeforeDocumentClosed
        'Do your stuff here.
    End Sub
    //We assume that the GdViewer1 control has been properly integrated.
                
    //Add the event.
    GdViewer1.BeforeDocumentClosed += GdViewer1_BeforeDocumentClosed;
                
    //Define the event.
    void GdViewer1_BeforeDocumentClosed()
    {
        //Do your stuff here.
    }
    See Also