Xojo Conferences

Platforms to show: All Mac Windows Linux Cross-Platform

Required plugins for this example: MBS MacBase Plugin, MBS Main Plugin
You find this example project in your Plugins Download as a Xojo project file within the examples folder: /MacBase/NSScreen
This example is the version from Sun, 17th Mar 2012.
Project "NSScreen.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
End Control
EventHandler Sub Open() dim mainscreen as NSScreenMBS = NSScreenMBS.mainScreen dim deepestScreen as NSScreenMBS = NSScreenMBS.deepestScreen dim screens(-1) as NSScreenMBS = NSScreenMBS.screens for each s as NSScreenMBS in screens List.AddRow hex(s.Handle) List.Cell(List.LastIndex,1)=s.frame List.Cell(List.LastIndex,2)=s.visibleFrame List.Cell(List.LastIndex,3)=str(s.depth) if s.colorSpace<>nil then dim colorspace as NSColorSpaceMBS = s.colorSpace List.Cell(List.LastIndex,4)=colorspace.localizedName end if if mainscreen=s then List.Cell(List.LastIndex,5)="yes" end if if deepestScreen=s then List.Cell(List.LastIndex,6)="yes" end if 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
End Project

Feedback, Comments & Corrections

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

MBS Xojo Plugins