Platforms to show: All Mac Windows Linux Cross-Platform

/Overlay/Overlay Drawings


Required plugins for this example: MBS Overlay Plugin

You find this example project in your Plugins Download as a Xojo project file within the examples folder: /Overlay/Overlay Drawings

This example is the version from Sun, 10th Dec 2016.

Project "Overlay Drawings.xojo_binary_project"
Class App Inherits Application
Const kEditClear = "&Löschen"
Const kFileQuit = "Beenden"
Const kFileQuitShortcut = ""
EventHandler Sub Open() dim w,h as integer w=screen(0).Width h=screen(0).Height o=new MyOverlay(0,0,w,h) o.Alpha=0.3 dim p,m as Picture p = new Picture(w,h,32) m = new Picture(w,h,32) o.Pict=p o.Mask=m o.UpdateShow End EventHandler
Property o As MyOverlay
End Class
Class Window1 Inherits Window
Control StaticText1 Inherits Label
ControlInstance StaticText1 Inherits Label
End Control
Control Timer1 Inherits Timer
ControlInstance Timer1 Inherits Timer
EventHandler Sub Action() dim p,m as Picture dim x,y as integer dim g as Graphics x=System.Mousex y=System.Mousey p=app.o.Pict m=app.o.Mask g=p.Graphics g.PenWidth=5 g.PenHeight=5 g.ForeColor=&cFF0000 g.DrawLine lastx,lasty,x,y g=m.Graphics g.PenWidth=5 g.PenHeight=5 g.ForeColor=&c000000 g.DrawLine lastx,lasty,x,y app.o.Update lastx=x lasty=y End EventHandler
End Control
Control StaticText2 Inherits Label
ControlInstance StaticText2 Inherits Label
End Control
EventHandler Function KeyDown(Key As String) As Boolean if asc(key)=32 then dim m as Picture dim g as Graphics lastx=System.Mousex lasty=System.Mousey m=app.o.Mask g=m.Graphics g.ForeColor=&cFFFFFF g.fillrect 0,0,g.Width,g.Height app.o.Update Return true end if End EventHandler
EventHandler Sub Open() lastx=System.Mousex lasty=System.Mousey End EventHandler
Property LastX As Integer
Property LastY As Integer
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
Class MyOverlay Inherits OverlayMBS
End Class
End Project

See also:

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


The biggest plugin in space...