WireLess Studio Widgets Developer's Guide
WSWDG ContentsWStWidget class reference

GetLastBarcodeType

Retrieves the type of the last barcode read on a WS_FIELD or a WS_SCANNER_CONTROLLER widget.

Ole declaration

SHORT GetLastBarcodeTypeById(SHORT usObjectId);

SHORT GetLastBarcodeTypeByName(LPCTSTR sObjectName);

Parameters
sObjectName
The name of the target widget.
usObjectId
The id of the target widget.
Return Value

On success, GetLastBarcodeType returns one of values described on RFIO.LastBarcodeType.

On error GetLastBarcodeType returns BCERROR. To get extended information, call WStError::GetLastErrorCode.

Remarks

The return values can be found on the RFBarcodeConstants enumeration.

Example
C#
using WirelessStudioOleWidgets;
WStWidget oWidget = new WStWidget();
WStFactory oFactory = new WStFactory();
short iFieldId = 33;
oFactory.CreateWidgetById((short)WSTFactoryConstants.WS_FIELD, iFieldId, "", 0,0, 50, 50, "123");
short iLastBarcodeType= oWidget.GetLastBarcodeTypeById(iFieldId);
Visual Basic 6 (Full Example: FieldDemoModule.bas.txt)
Public wsWidget As New WStWidget
...
If wsWidget.GetLastInputTypeByName("field") = WLSCANTYPE Then
	sEventResultText = sEventResultText + " BCT: " + _
		sNames(wsWidget.GetLastBarcodeTypeByName("field"))
End If
...
See also

ModifyDisplayMode | ModifyInputMode | ModifyInputDevices | ModifyLenCtrlMode | SetKeyboardMode | SetScannerConfigFile | SetMaxLength | GetLastInputType

WStWiget class reference | WStForm class reference | WStFactory class reference | WStError class reference