Platforms to show: All Mac Windows Linux Cross-Platform

/Phidgets/Phidgets


Required plugins for this example: MBS Phidgets Plugin

You find this example project in your Plugins Download as a Xojo project file within the examples folder: /Phidgets/Phidgets

This example is the version from Sat, 18th Feb 2022.

Project "Phidgets.xojo_binary_project"
Class App Inherits DesktopApplication
Const kEditClear = "&Delete"
Const kFileQuit = "&Quit"
Const kFileQuitShortcut = ""
End Class
Class Window1 Inherits DesktopWindow
EventHandler Sub Opening() #If TargetWindows Const path = "Phidget22.dll" #Else TargetMacOS Then Const path = "/Library/Frameworks/Phidget22.framework" #Else // todo? #EndIf If PhidgetManagerMBS.LoadLibrary(path) Then 'MessageBox "OK" Else MessageBox PhidgetManagerMBS.LibraryLoadError Return End If // create new obejct Dim t As New MyPhidgetLCDMBS // attach Call t.openWaitForAttachment(5000) Call t.writeText(t.kFont5x8, 0, 0, "Hello World") Call t.Flush MessageBox "You see text?" Call t.close End EventHandler
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
Class MyPhidgetLCDMBS Inherits PhidgetLCDMBS
EventHandler Sub Attached() System.DebugLog CurrentMethodName End EventHandler
EventHandler Sub Detached() System.DebugLog CurrentMethodName End EventHandler
EventHandler Sub Error(errorCode as Integer, errorString as String) System.DebugLog CurrentMethodName System.DebugLog errorString End EventHandler
End Class
End Project

See also:

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


The biggest plugin in space...