Platforms to show: All Mac Windows Linux Cross-Platform
/USB/HID Mac/USB HID Devices Mac
Required plugins for this example: MBS USB Plugin
Last modified Sun, 17th Mar 2012.
You find this example project in your MBS Xojo Plugin download as a Xojo project file within the examples folder: /USB/HID Mac/USB HID Devices Mac
Download this example: USB HID Devices Mac.zip
Project "USB HID Devices Mac.xojo_binary_project"
FileTypes
Filetype text
End FileTypes
Class Window1 Inherits Window
Control ListBox1 Inherits Listbox
ControlInstance ListBox1 Inherits Listbox
End Control
Control StaticText1 Inherits Label
ControlInstance StaticText1 Inherits Label
End Control
EventHandler Sub Open()
dim m as new MacHIDMBS
#if not TargetMacOS
MsgBox "This example requires Mac OS X."
#endif
if m.FindFirstDevice then
do
ListBox1.AddRow ""
ListBox1.Cell(ListBox1.LastIndex,0)=hex(m.ProductID)
ListBox1.Cell(ListBox1.LastIndex,1)=hex(m.VendorID)
ListBox1.cell(ListBox1.LastIndex,2)=m.Product
ListBox1.cell(ListBox1.LastIndex,3)=m.Manufacturer
ListBox1.cell(ListBox1.LastIndex,4)=m.SerialNumber
ListBox1.cell(ListBox1.LastIndex,5)=hex(m.VersionNumber)
loop until not m.FindNextDevice
end if
Title=str(ListBox1.ListCount)+" devices found."
End EventHandler
End Class
MenuBar MenuBar1
MenuItem UntitledMenu1 = ""
MenuItem FileMenu = "&File"
MenuItem FileQuit = "Quit"
MenuItem EditMenu = "&Edit"
MenuItem EditUndo = "&Undo"
MenuItem UntitledMenu0 = "-"
MenuItem EditCut = "Cu&t"
MenuItem EditCopy = "&Copy"
MenuItem EditPaste = "&Paste"
MenuItem EditClear = "Clear"
End MenuBar
Class App Inherits Application
End Class
End Project
See also:
- /USB/HID Linux/USB Devices Linux
- /USB/HID Linux/USB HID Devices Linux
- /USB/HID Linux/USB HID IO Warrior Linux LEDs
- /USB/HID Mac/USB HID IO Warrior Mac OS X LEDs
- /USB/HID Mac/USB HID Test Mac
- /USB/HID Windows/USB HID Devices Win
- /USB/HID Windows/USB HID IO Warrior Windows LEDs
Download this example: USB HID Devices Mac.zip
The items on this page are in the following plugins: MBS USB Plugin.