Xojo Developer Conference
25/27th April 2018 in Denver.
MBS Xojo Conference
6/7th September 2018 in Munich, Germany.

MBS Xojo Plugin Tutorial Videos

Overlay Source

Class App
Inherits Application
// Constants
Const kFileQuitShortcut = Ctrl+Q
Const kFileQuit = E&xit
Const kEditClear = &Delete

// Properties
Dim O As OverlayMBS



// Event implementations
Sub Open()

dim png as PNGPictureMBS
dim f as FolderItem

f=GetFolderItem("cubes.png")

png=f.OpenAsPNGMBS(0)

dim p,m as Picture

p=NewPicture(320,240,32)
m=NewPicture(320,240,32)

p.Graphics.DrawPicture png.Pict,0,0
m.Graphics.DrawPicture png.Mask,0,0


dim s as screen = screen(0)

o=new MyOverlay((s.Width-p.Width)/2,(s.Height-p.Height)/2,p.Width,p.Height)

o.Pict=p
o.Mask=m

o.UpdateShow

End Sub
End Class

Class MyOverlay
Inherits OverlayMBS
// Properties
Dim LastX As Integer


Dim LastY As Integer



// Event implementations
Function MouseDown(x as integer, y as integer) As boolean
LastX=System.MouseX
LastY=System.MouseY

Return true

End Function
Function MouseDragged(x as integer, y as integer) As boolean
dim px,py as integer

px=System.Mousex
py=System.Mousey

me.left=me.left+px-lastx
me.top=me.top+py-lasty

lastx=px
lasty=py

Return true

End Function
End Class


All movies




Links
MBS FileMaker Plugins