ImageGear21.Twain Assembly > ImageGear.TWAIN Namespace : ImGearTWAINBeforePageEventHandler Delegate |
'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 )
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:
// 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 }