Xojo Conferences

Platforms to show: All Mac Windows Linux Cross-Platform

Required plugins for this example: MBS Main Plugin, MBS Picture Plugin
You find this example project in your Plugins Download as a Xojo project file within the examples folder: /Picture/GrayScaleMBS
This example is the version from Sun, 17th Mar 2012.
Project "GrayScaleMBS.rbp"
Class App Inherits Application
Const kEditClear = "&Löschen"
Const kFileQuit = "Beenden"
Const kFileQuitShortcut = ""
End Class
Class Window1 Inherits Window
Control out Inherits Canvas
ControlInstance out(0) Inherits Canvas
ControlInstance out(1) Inherits Canvas
ControlInstance out(2) Inherits Canvas
ControlInstance out(3) Inherits Canvas
EventHandler Sub MouseMove(index as Integer, X As Integer, Y As Integer) Update x,y End EventHandler
End Control
Control info Inherits Label
ControlInstance info(0) Inherits Label
ControlInstance info(1) Inherits Label
ControlInstance info(2) Inherits Label
ControlInstance info(3) Inherits Label
End Control
EventHandler Sub Open() dim logo as Picture = LogoMBS(500) for i as integer = 0 to 3 p(i) = logo.GrayScaleMBS(i) out(i).Backdrop = p(i) next End EventHandler
Protected Sub Update(x as integer, y as integer) for i as integer=0 to 3 dim c as color = p(i).RGBSurface.pixel(x,y) info(i).Text = str(c.Red)+" "+str(c.Green)+" "+str(C.Blue) next End Sub
Property Protected p(3) As Picture
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 Picture Plugin.

MBS FileMaker tutorial videos