ImageGear .NET v25.2 - Updated
ImageGear.Twain Assembly / ImageGear.TWAIN Namespace / ImGearTWAINBeforePageEventHandler Delegate
Object which triggered the event.
Data about the event.
ExampleExample




In This Topic
    ImGearTWAINBeforePageEventHandler Delegate
    In This Topic
    This is the delegate used to pass ImGearTWAIN.BeforePage events on to an application event handler.
    Syntax
    'Declaration
     
    Public Delegate Sub ImGearTWAINBeforePageEventHandler( _
       ByVal sender As Object, _
       ByVal e As ImGearTWAINBeforePageEventArgs _
    ) 
    'Usage
     
    Dim instance As New ImGearTWAINBeforePageEventHandler(AddressOf HandlerMethod)
    public delegate void ImGearTWAINBeforePageEventHandler( 
       object sender,
       ImGearTWAINBeforePageEventArgs e
    )
    public: __gc __delegate void ImGearTWAINBeforePageEventHandler( 
       Object* sender,
       ImGearTWAINBeforePageEventArgs* e
    )
    public delegate void ImGearTWAINBeforePageEventHandler( 
       Object^ sender,
       ImGearTWAINBeforePageEventArgs^ e
    )

    Parameters

    sender
    Object which triggered the event.
    e
    Data about the event.
    Remarks

    The delegate follows the standard .NET event model. The ImGearTWAIN.BeforePage event occurs before scanning a page. It provides the page number to be scanned and gives an opportunity to cancel scanning.

    Here's an example of typical ImGearTWAIN.BeforePage event registration and declaration:

    Example
    // Event Registration
    ImGearTWAIN imGearTWAIN = new ImGearTWAIN();
    imGearTWAIN.BeforePage += new ImGearTWAINBeforePageEventHandler(imGearTWAIN_BeforePage);
    // Event Declaration
    void imGearTWAIN_BeforePage(object sender, ImGearTWAINBeforePageEventArgs e)
    {
        // Access event arguments via ImGearTWAINBeforePageEventArgs e 
    }
    See Also