GraphicsWindow.Width=800
GraphicsWindow.Height=600
GraphicsWindow.BackgroundColor="white"
start=Controls.AddButton("OK",300,200)
For i=1 To 20
  x=Math.GetRandomNumber(700)
  y=Math.GetRandomNumber(500)
  Controls.Move(start,x,y)
  Program.Delay(1000)
EndFor




GraphicsWindow.Width=800
GraphicsWindow.Height=600
Controls.ButtonClicked = OnButtonClicked
GraphicsWindow.BackgroundColor="lightgray"
GraphicsWindow.FontSize=40
GraphicsWindow.BrushColor="red"
GraphicsWindow.DrawText(180,100,"Terület, kerület számítás")
GraphicsWindow.FontSize=20
GraphicsWindow.BrushColor="blue"
GraphicsWindow.DrawText(250,200,"a=")
asz=Controls.AddTextBox(300,200)
GraphicsWindow.DrawText(250,250,"b=")
bsz=Controls.AddTextBox(300,250)
GraphicsWindow.DrawText(250,300,"kerület=")
ke=Controls.AddTextBox(350,300)
GraphicsWindow.DrawText(250,350,"terület=")
te=Controls.AddTextBox(350,350)
Controls.AddButton("Számol",350,400)
Sub OnButtonClicked
 a=Controls.GetTextBoxText(asz)
 b=Controls.GetTextBoxText(bsz)
 k=2*(a+b)
 t=a*b
 Controls.SetTextBoxText(ke,k)
 Controls.SetTextBoxText(te,t)
EndSub



Controls.ButtonClicked = OnButtonClicked
GraphicsWindow.Width=500
GraphicsWindow.Height=200
GraphicsWindow.BackgroundColor="lightgray"
GraphicsWindow.FontSize=30
GraphicsWindow.BrushColor="blue"
kotta=Controls.AddTextBox(50,50)
Controls.SetSize(kotta,400,50)
play=Controls.AddButton("PLAY",350,120)
Controls.SetSize(play,100,50)

Sub OnButtonClicked
  Sound.PlayMusic(Controls.GetTextBoxText(kotta))
EndSub