Platforms to show: All Mac Windows Linux Cross-Platform

/Barcode/zxing/ZxingBarcodeReader


Last modified Tue, 26th Aug 2024.

You find this example project in your MBS Xojo Plugin download as a Xojo project file within the examples folder: /Barcode/zxing/ZxingBarcodeReader

Download this example: ZxingBarcodeReader.zip

Project "ZxingBarcodeReader.xojo_binary_project"
Class App Inherits DesktopApplication
Const kEditClear = "&Delete"
Const kFileQuit = "&Quit"
Const kFileQuitShortcut = ""
End Class
Class MainWindow Inherits DesktopWindow
Control List Inherits DesktopListBox
ControlInstance List Inherits DesktopListBox
EventHandler Sub DoublePressed() If Me.SelectedRowIndex < Me.SelectedRowCount Then MessageBox Me.CellTextAt(Me.SelectedRowIndex, 1) End If End EventHandler
End Control
EventHandler Sub DropObject(obj As DragItem, action As DragItem.Types) If obj.PictureAvailable Then run obj.Picture End If If obj.FolderItemAvailable Then run picture.open(obj.FolderItem) End If End EventHandler
EventHandler Sub Opening() run test Me.AcceptFileDrop "" End EventHandler
Sub run(pic as Picture) List.RemoveAllRows if pic = nil then Return Dim options As New ZXingReaderOptionsMBS options.textMode = options.TextModeHRI options.eanAddOnSymbol = options.EanAddOnSymbolRead Dim result As ZXingReaderResultMBS = ZxingBarcodeMBS.ReadBarcode(pic, options) List.AddRow "Text", result.Text If options.textMode = options.TextModeECI Then List.AddRow "Bytes", EncodeHex(result.bytesECI) Else List.AddRow "Bytes", EncodeHex(result.bytes) End If List.AddRow "Format", ZxingBarcodeMBS.BarcodeFormatToString(result.Format) List.AddRow "Identifier", result.symbologyIdentifier List.AddRow "hasECI", result.hasECI.ToString List.AddRow "isMirrored", result.isMirrored.ToString List.AddRow "isInverted", result.isInverted.ToString List.AddRow "ecLevel", result.ecLevel List.AddRow "sequenceId", result.sequenceId List.AddRow "version", result.version List.AddRow "orientation", result.orientation.ToString List.AddRow "Error Type", result.errorType.ToString List.AddRow "Error Message", result.errorMessage List.AddRow "Error Location", result.errorLocation List.AddRow "Position TopLeft", result.topLeftX.ToString+"/"+result.topLeftY.ToString List.AddRow "Position TopRight", result.TopRightX.ToString+"/"+result.TopRightY.ToString List.AddRow "Position BottomLeft", result.BottomLeftX.ToString+"/"+result.BottomLeftY.ToString List.AddRow "Position BottomRight", result.BottomRightX.ToString+"/"+result.BottomRightY.ToString End Sub
End Class
MenuBar MainMenuBar
MenuItem FileMenu = "&File"
MenuItem FileQuit = "#App.kFileQuit"
MenuItem EditMenu = "&Edit"
MenuItem EditUndo = "&Undo"
MenuItem EditSeparator1 = "-"
MenuItem EditCut = "Cu&t"
MenuItem EditCopy = "&Copy"
MenuItem EditPaste = "&Paste"
MenuItem EditClear = "#App.kEditClear"
MenuItem EditSeparator2 = "-"
MenuItem EditSelectAll = "Select &All"
MenuItem HelpMenu = "&Help"
End MenuBar
Sign
End Sign
End Project

Download this example: ZxingBarcodeReader.zip

The items on this page are in the following plugins: MBS Barcode Plugin.


The biggest plugin in space...