GdPicture.NET.14
GdPicture14 Namespace / GdViewer Class / BeforeDocumentChange Event
Example





In This Topic
BeforeDocumentChange Event (GdViewer)
In This Topic
This event is raised right before the new document is displayed (changed) after the successful loading in the GdViewer control using one of the DisplayFrom... methods.

Please check the corresponded GdViewer.BeforeDocumentChangeEventHandler for more details.

Syntax
'Declaration
 
Public Event BeforeDocumentChange As GdViewer.BeforeDocumentChangeEventHandler
public event GdViewer.BeforeDocumentChangeEventHandler BeforeDocumentChange
public event BeforeDocumentChange: GdViewer.BeforeDocumentChangeEventHandler; 
In JScript, you can handle the events defined by another class, but you cannot define your own.
public: __event GdViewer.BeforeDocumentChangeEventHandler* BeforeDocumentChange
public:
event GdViewer.BeforeDocumentChangeEventHandler^ BeforeDocumentChange
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.BeforeDocumentChange, AddressOf GdViewer1_BeforeDocumentChange
            
'Define the event.
Sub GdViewer1_BeforeDocumentChange() Handles GdViewer1.BeforeDocumentChange
    'The document is going to be displayed after the successful loading.
End Sub
//We assume that the GdViewer1 control has been properly integrated.
            
//Add the event.
GdViewer1.BeforeDocumentChange += GdViewer1_BeforeDocumentChange;
            
//Define the event.
void GdViewer1_BeforeDocumentChange()
{
    //The document is going to be displayed after the successful loading.
}
See Also