Platforms to show: All Mac Windows Linux Cross-Platform

/MacCG/CoreGraphics DirectDisplay/CGDisplay Rotation


Required plugins for this example: MBS MacCG Plugin, MBS MacCF Plugin

You find this example project in your Plugins Download as a Xojo project file within the examples folder: /MacCG/CoreGraphics DirectDisplay/CGDisplay Rotation

This example is the version from Sat, 7th Dec 2012.

Project "CGDisplay Rotation.xojo_binary_project"
Class App Inherits Application
Const kEditClear = "&Löschen"
Const kFileQuit = "Beenden"
Const kFileQuitShortcut = ""
End Class
Class Window1 Inherits Window
Control BevelButton1 Inherits BevelButton
ControlInstance BevelButton1 Inherits BevelButton
EventHandler Sub Action() dim d as CGDisplayMBS = CGDisplayMBS.MainDisplay dim e as integer = d.SetRotation(90) if e<>0 then MsgBox "Error: "+str(e) end if End EventHandler
End Control
Control BevelButton2 Inherits BevelButton
ControlInstance BevelButton2 Inherits BevelButton
EventHandler Sub Action() dim d as CGDisplayMBS = CGDisplayMBS.MainDisplay dim e as integer = d.SetRotation(180) if e<>0 then MsgBox "Error: "+str(e) end if End EventHandler
End Control
Control BevelButton3 Inherits BevelButton
ControlInstance BevelButton3 Inherits BevelButton
EventHandler Sub Action() dim d as CGDisplayMBS = CGDisplayMBS.MainDisplay dim e as integer = d.SetRotation(270) if e<>0 then MsgBox "Error: "+str(e) end if End EventHandler
End Control
Control BevelButton4 Inherits BevelButton
ControlInstance BevelButton4 Inherits BevelButton
EventHandler Sub Action() dim d as CGDisplayMBS = CGDisplayMBS.MainDisplay dim e as integer = d.SetRotation(0) if e<>0 then MsgBox "Error: "+str(e) end if End EventHandler
End Control
EventHandler Sub Close() dim d as CGDisplayMBS = CGDisplayMBS.MainDisplay dim e as integer = d.SetRotation(0) 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

See also:

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


The biggest plugin in space...