Reference Guide
GdPicture14 Namespace / GdViewer Class / PageChanged Event
Example





In This Topic
    PageChanged Event (GdViewer)
    In This Topic
    This event is raised after the current page has been successfully changed.

    Please check the corresponded GdViewer.PageChangedEventHandler for more details.

    Syntax
    'Declaration
     
    
    Public Event PageChanged As GdViewer.PageChangedEventHandler
    public event GdViewer.PageChangedEventHandler PageChanged
    public event PageChanged: GdViewer.PageChangedEventHandler; 
    In JScript, you can handle the events defined by another class, but you cannot define your own.
    public: __event GdViewer.PageChangedEventHandler* PageChanged
    public:
    event GdViewer.PageChangedEventHandler^ PageChanged
    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.PageChanged, AddressOf GdViewer1_PageChanged
                
    'Define the event.
    Sub GdViewer1_PageChanged() Handles GdViewer1.PageChanged
        MessageBox.Show("The changed page number: " + GdViewer1.CurrentPage.ToString(), "GdViewer.PageChanged")
    End Sub
    //We assume that the GdViewer1 control has been properly integrated.
                
    //Add the event.
    GdViewer1.PageChanged += GdViewer1_PageChanged;
                
    //Define the event.
    void GdViewer1_PageChanged()
    {
        MessageBox.Show("The changed page number: " + GdViewer1.CurrentPage.ToString(), "GdViewer.PageChanged");
    }
    See Also