Datalogic .NET SDK

DecodeEvent (Constructor) (+1 overload)

 

Syntax

 

public DecodeEvent(DecodeHandle hDcd, DecodeRequest reqType, Control ctlInvoker);

 

 

Class                           : DecodeEvent

Namespace                : Datalogic.API

Assembly                   : Datalogic.API.DLL

 

 

 

Description

Constructor to Datalogic.API.DecodeEvent. When an instance of this class is created, an event listener will start to listen to the decoder.

 

 

 

Parameters Table

 

Type

Parameter

Description

[in]

DecodeHandle

hDcd

Handle to the decoding device to query. An instance of the Datalogic.API.DecodeHandle class represents this handle.

[in]

DecodeRequest

reqType

Type of event request being posted. It is a logical OR'ing of any of the Datalogic.API.DecodeRequest values.

[in]

Control

ctlInvoker

An instance of a control where this DecodeEvent instance is being created in. Specify this parameter if raised Scanned events will be manipulating UI elements contained in  ctlInvoker.

 

 

 

 

[return]

-

 

-

[on error]

-

 

-

 

 

 

Example

 

   private void MainDlg_Load(object sender, System.EventArgs e)

   {

       DecodeHandle hDcd = new DecodeHandle(  DecodeDeviceCap.Exists |

                                               DecodeDeviceCap.Barcode);

       DecodeRequest reqType = (DecodeRequest)1 | DecodeRequest.PostRecurring;

 

       // Constructor with Invoker to “this” Control

       dcdEvent = new DecodeEvent(hDcd, reqType, this);

   }

 

 

 

Remarks

Make sure to call Datalogic.API.DecodeEvent.StopScanListener when DecodeEvent no longer needs to listen to the decoder.

 

 

See Also

DecodeHandle (Class), Request (Enum), DecodeEvent.StopScanListener (Method), Example #021.

 

 

Copyright © Datalogic ADC. All Right Reserved