Platforms to show: All Mac Windows Linux Cross-Platform

WindowsDeviceModeMBS class

Type Topic Plugin Version macOS Windows Linux iOS Targets
class Printing MBS Win Plugin 10.4 ❌ No ✅ Yes ❌ No ❌ No Desktop, Console & Web
The class for device modue information for a Windows printer.
dim d as new WindowsDeviceModeMBS
dim name as string = "My printer"

// here we define which values we want to change
// and change value
d.Orientation = d.DMORIENT_PORTRAIT

dim w as WindowsPrinterMBS = WindowsPrinterMBS.OpenPrinter(name)
if w.ChangePrinterSettings(d, 2) then
MsgBox "OK"
MsgBox "Failed"
end if

Basicly this class wraps the Windows DEVMODE structure.

For more information on the DEVMODE structure, visit this website:

  • 27 properties
  • 5 methods
    • method ApplyToSetupString(SetupString as String) as string
    • method Constructor
    • method RawData(Unicode as boolean = true) as memoryblock
    • method SetupString(ActualHorizontalResolution as integer, ActualVerticalResolution as integer, MaxHorizontalResolution as integer, MaxVerticalResolution as integer, MarginLeft as integer = 2500, MarginRight as integer = 2500, MarginTop as integer = 2500, MarginBottom as integer = 2500, MinMarginLeft as integer = 0, MinMarginRight as integer = 0, MinMarginTop as integer = 0, MinMarginBottom as integer = 0, PageSetupFlags as integer = 8) as string
    • method SetupString(Margin as Integer = 2500) as string
  • 3 shared methods
    • shared method FromRawData(data as memoryblock, Unicode as boolean = true) as WindowsDeviceModeMBS
    • shared method FromRawData(data as string, Unicode as boolean = true) as WindowsDeviceModeMBS
    • shared method FromSetupString(SetupString as String) as WindowsDeviceModeMBS
  • 206 constants

This class has no sub classes.

Some methods using this class:

Some properties using for this class:

Some examples using this class:

Blog Entries

Xojo Developer Magazine


Release notes

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

WindowsDeviceMBS   -   WindowsDirectoryChangeMBS

The biggest plugin in space...