Xojo Conferences
MBSSep2018MunichDE
XDCMay2019MiamiUSA

Platforms to show: All Mac Windows Linux Cross-Platform

/Win/Windows Devices
Function:
Required plugins for this example: MBS Win Plugin
You find this example project in your Plugins Download as a Xojo project file within the examples folder: /Win/Windows Devices
This example is the version from Sun, 17th Mar 2012.
Project "Windows Devices.rbp"
Class App Inherits Application
Const kEditClear = "&Löschen"
Const kFileQuit = "Beenden"
Const kFileQuitShortcut = ""
End Class
Class Window1 Inherits Window
Control List Inherits Listbox
ControlInstance List Inherits Listbox
EventHandler Sub DoubleClick() MsgBox me.Cell(me.ListIndex,0)+EndOfLine+me.Cell(me.ListIndex,1) End EventHandler
EventHandler Sub ExpandRow(row As Integer) dim w as WindowsDeviceMBS = me.RowTag(row) me.AddRow "Address", str(w.Address) me.AddRow "BusNumber", str(w.BusNumber) me.AddRow "BusTypeGUID", w.BusTypeGUID me.AddRow "Capabilities", str(w.Capabilities) me.AddRow "Characteristics", str(w.Characteristics) me.AddRow "Class", w.ClassName me.AddRow "ClassGUID", w.ClassGUID me.AddRow "ConfigFlags", str(W.ConfigFlags) me.AddRow "CompatibleIDs", Join(w.CompatibleIDs) me.AddRow "Description", w.Description me.AddRow "DeviceType", str(w.DeviceType) me.AddRow "Driver", w.Driver me.AddRow "EnumeratorName", w.EnumeratorName me.AddRow "Exclusive", str(w.Exclusive) me.AddRow "FriendlyName", w.FriendlyName me.AddRow "HardwareID", Join(w.HardwareID) me.AddRow "InstallState", str(w.InstallState) me.AddRow "LegacyBusType", str(w.LegacyBusType) me.AddRow "LocationInformation", w.LocationInformation me.AddRow "LocationPaths", join(w.LocationPaths) me.AddRow "LowerFilters", join(w.LowerFilters) me.AddRow "Manufacturer", w.Manufacturer me.AddRow "PhysicalDeviceObjectName", w.PhysicalDeviceObjectName me.AddRow "RemovalPolicy", str(w.RemovalPolicy) me.AddRow "RemovalPolicyHWDefault", str(W.RemovalPolicyHWDefault) me.AddRow "RemovalPolicyOverride", str(w.RemovalPolicyOverride) me.AddRow "SecurityDescriptor", w.SecurityDescriptor me.AddRow "Service", w.Service me.AddRow "UINumber", str(w.UINumber) me.AddRow "UpperFilters", join(w.UpperFilters) me.AddRow "DeviceID", w.DeviceID me.AddRow "DevicePath", w.DevicePath me.AddRow "HID", str(w.HID) if w.HID then me.AddRow "Accessible", str(w.HIDAccessible) me.AddRow "ProductName", w.HIDProductName me.AddRow "ManufacturerName", w.HIDManufacturerName me.AddRow "SerialNumber", w.HIDSerialNumber me.AddRow "InputReportByteLength", str(w.HIDInputReportByteLength) me.AddRow "OutputReportByteLength", str(w.HIDOutputReportByteLength) me.AddRow "FeatureReportByteLength", str(w.HIDFeatureReportByteLength) me.AddRow "ProductID", str(w.HIDProductID) me.AddRow "VendorID", str(w.HIDVendorID) me.AddRow "VersionNumber", str(w.HIDVersionNumber) end if End EventHandler
End Control
EventHandler Sub Open() // only serial devices: 'const PortsGUID = "{4D36E978-E325-11CE-BFC1-08002BE10318}" 'dim devices(-1) as WindowsDeviceMBS = WindowsDeviceMBS.Devices(PortsGUID) // all devices dim devices(-1) as WindowsDeviceMBS = WindowsDeviceMBS.Devices for each d as WindowsDeviceMBS in devices List.AddFolder d.Description List.rowtag(List.LastIndex)=d next End EventHandler
End Class
MenuBar MenuBar1
MenuItem FileMenu = "&Ablage"
MenuItem FileQuit = "#App.kFileQuit"
MenuItem EditMenu = "&Bearbeiten"
MenuItem EditUndo = "&Rückgängig"
MenuItem UntitledMenu1 = "-"
MenuItem EditCut = "&Ausschneiden"
MenuItem EditCopy = "&Kopieren"
MenuItem EditPaste = "&Einfügen"
MenuItem EditClear = "#App.kEditClear"
MenuItem UntitledMenu0 = "-"
MenuItem EditSelectAll = "&Alles auswählen"
End MenuBar
Module Util
Sub AddRow(extends list as listbox, cell1 as string, cell2 as string) List.AddRow cell1 List.cell(List.LastIndex,1)=cell2 End Sub
End Module
End Project

See also:

Feedback, Comments & Corrections

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





Links
MBS FileMaker Plugins