Platforms to show: All Mac Windows Linux Cross-Platform

/Barcode/zxing/Multi Barcode Tests/Multi Barcode Tests Code128


Required plugins for this example: MBS Barcode Plugin

You find this example project in your Plugins Download as a Xojo project file within the examples folder: /Barcode/zxing/Multi Barcode Tests/Multi Barcode Tests Code128

This example is the version from Tue, 4th Nov 2019.

Project "Multi Barcode Tests Code128.xojo_binary_project"
Class App Inherits Application
Const kEditClear = "&Delete"
Const kFileQuit = "&Quit"
Const kFileQuitShortcut = ""
End Class
Class MultiBarcodeWindow Inherits Window
Control Image Inherits Canvas
ControlInstance Image Inherits Canvas
End Control
Control List Inherits Listbox
ControlInstance List Inherits Listbox
End Control
Control CodeMultiReaderButton Inherits PushButton
ControlInstance CodeMultiReaderButton Inherits PushButton
EventHandler Sub Action() // crashes, so currently not included List.DeleteAllRows Dim hint As New zxingDecodeHintsMBS(zxingDecodeHintsMBS.CODE_128_HINT) Dim MyCodeReader As New zxingCode128ReaderMBS Dim MultipleBarcodeReader As New zxingGenericMultipleBarcodeReaderMBS(MyCodeReader) Dim Bitmap As zxingBinaryBitmapMBS = zxingBinaryBitmapMBS.CreateWithPicture(pic) // errore Dim results() As zxingResultMBS = MultipleBarcodeReader.decodeMultiple(bitmap, hint) For Each r As zxingResultMBS In results List.AddRow r.BarcodeFormat.Name List.AddRow r.Text Next Exception r As zxingExceptionMBS MsgBox r.message End EventHandler
End Control
EventHandler Sub Open() Dim f As FolderItem = FindFile("code128_test.jpg") Dim p As Picture = Picture.Open(f) image.Backdrop = p pic = p End EventHandler
Function FindFile(name as string) As FolderItem // Look for file in parent folders from executable on dim parent as FolderItem = app.ExecutableFile.Parent while parent<>Nil dim file as FolderItem = parent.Child(name) if file<>Nil and file.Exists then Return file end if parent = parent.Parent wend End Function
Property pic As Picture
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"
End MenuBar
End Project

See also:

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


The biggest plugin in space...