MBS Xojo Developer Conference and Training
Join us from 3rd to 6th May 2017 in Berlin, Germany.

MBS Real Studio Plugin Tutorial Videos

CGS Source

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

Class Window1
Inherits Window
// Controls
ControlInstance
Sub Action() Handles Event
dim r as CGSTransitionRequestMBS
dim t as CGSTransitionMBS
dim co as CGSConnectionMBS

co=new CGSConnectionMBS

r=new CGSTransitionRequestMBS
r.TransitionType=r.CGSCube
r.TransitionOption=r.CGSRight

r.HasBackColor=false
r.HasBackGround=True

t=co.NewTransition(r)
if t<>Nil then
Refresh
t.Invoke 5
t.Wait 5
t.Release
else
MsgBox "No transitions available."
end if

End Sub
End ControlInstance
ControlInstance
Sub Action() Handles Event
dim r as CGSTransitionRequestMBS
dim t as CGSTransitionMBS
dim w as CGSWindowMBS
dim co as CGSConnectionMBS

co=new CGSConnectionMBS
w=co.CGSWindow(Self)

r=new CGSTransitionRequestMBS

r.TransitionType=r.CGSFlip
r.TransitionOption=r.CGSLeft
r.HasBackColor=false
r.HasBackGround=false
r.win=w

t=co.NewTransition(r)
if t<>Nil then
Refresh
t.Invoke .5
t.Wait .5
t.Release
end if

End Sub
End ControlInstance
ControlInstance
Sub Action() Handles Event
dim r as CGSTransitionRequestMBS
dim t as CGSTransitionMBS
dim w as CGSWindowMBS
dim co as CGSConnectionMBS

co=new CGSConnectionMBS
w=co.CGSWindow(Self)

r=new CGSTransitionRequestMBS

r.TransitionType=r.CGSFlip
r.TransitionOption=r.CGSRight
r.HasBackColor=false
r.HasBackGround=false
r.win=w

t=co.NewTransition(r)
if t<>Nil then
Refresh
t.Invoke .5
t.Wait .5
t.Release
end if

End Sub
End ControlInstance
ControlInstance
Sub Action() Handles Event
dim r as CGSTransitionRequestMBS
dim t as CGSTransitionMBS
dim w as CGSWindowMBS
dim c as CGSConnectionMBS

c=new CGSConnectionMBS

w=c.CGSWindow(self)

r=new CGSTransitionRequestMBS
r.TransitionType=r.CGSWarpFade
r.TransitionOption=r.CGSDown
r.HasBackGround=false
r.HasBackColor=false
r.Win=w

t=c.NewTransition(r)
if t<>Nil then
Refresh
t.Invoke 5
t.Wait 5
t.Release
end if
End Sub
End ControlInstance

// Event implementations
Sub Paint(g As Graphics)
g.ForeColor=Rgb(rnd*256,rnd*256,rnd*256)

g.FillRect 0,0,g.Width,g.Height
End Sub
End Class


All movies




Links
MBS Xojo tutorial videos