multiply windows?
try this one;
`%Project Title%
`%Source File Name%
`======================
type TWindow
PosX as Float
PosY as Float
SizeX as Integer
SizeY as Integer
Caption as String
XSpeed as Float
YSpeed as Float
Drag as Byte
DragX as Float
DragY as Float
endtype
dim WindowList(0) as Twindow
sync rate 60
hide mouse
//Creating window..
randomize timer()
for a = 1 to 5
CreateWindow("Window Num "+str$(a),rnd(600),rnd(600),rnd(200)+100,rnd(200)+100)
next a
//loop
do
cls
DrawMouse()
DrawWindows()
loop
//the engine.
global MX as Float
global MY as Float
global MX1 as float
global MY1 as float
global MX2 as float
global MY2 as float
global InitMouse as Boolean
global TrailLimit as float
global MouseLimit as float
global MLKey as Byte
global MClick as Byte
global OldClickX as Integer
global OldClickY as Integer
global CircleSmooth as float
global CircleSize as Integer
function CreateWindow(Caption as String,PosX as Integer,PosY as Integer,SizeX as Integer,SizeY as Integer)
dim WindowList(array count(WindowList(0))+1) as TWindow
a as integer
a = array count(WindowList(0))-1
WindowList(a).PosX = PosX
WindowList(a).PosY = PosY
WindowList(a).SizeX = SizeX
WindowList(a).SizeY = SizeY
WindowList(a).Caption = Caption
endfunction
function DrawWindows()
a as integer
for a = 0 to array count(WindowList())-1
//caption
line WindowList(a).PosX,WindowList(a).PosY,WindowList(a).PosX+WindowList(a).SizeX,WindowList(a).PosY
line WindowList(a).PosX,WindowList(a).PosY+20,WindowList(a).PosX+WindowList(a).SizeX,WindowList(a).Posy+20
line WindowList(a).PosX,WindowList(a).PosY,WindowList(a).PosX,WindowList(a).Posy+20
line WindowList(a).PosX+WindowList(a).SizeX,WindowList(a).PosY,WindowList(a).PosX+WindowList(a).SizeX,WindowList(a).Posy+20
center text WindowList(a).PosX+((WindowList(a).SizeX) / 2),WindowList(a).PosY+10-(Text height(WindowList(a).Caption) / 2),WindowList(a).Caption
//GUI Box
line WindowList(a).PosX,WindowList(a).PosY+20,WindowList(a).PosX+WindowList(a).XSpeed,WindowList(a).Posy+20+WindowList(a).SizeY+WindowList(a).YSpeed
line WindowList(a).PosX+WindowList(a).SizeX+WindowList(a).XSpeed,WindowList(a).PosY+20+WindowList(a).SizeY+WindowList(a).YSpeed,WindowList(a).PosX+WindowList(a).SizeX,WindowList(a).Posy+20
line WindowList(a).PosX+WindowList(a).XSpeed,WindowList(a).Posy+20+WindowList(a).SizeY+WindowList(a).YSpeed,WindowList(a).PosX+WindowList(a).SizeX+WindowList(a).XSpeed,WindowList(a).Posy+20+WindowList(a).SizeY+WindowList(a).YSpeed
//Checking the click for drag
if MLKey = 1 and mx > WindowList(a).PosX and mx < WindowList(a).PosX+WindowList(a).SizeX and my > WindowList(a).PosY and My < WindowList(a).PosY+20
WindowList(a).Drag = 1
WindowList(a).DragX = mx - WindowList(a).PosX
WindowList(a).DragY = my - WindowList(a).PosY
endif
if MLKey = 2 and WindowList(a).Drag = 1
WindowList(a).XSpeed = WindowList(a).PosX
WindowList(a).YSpeed = WindowList(a).PosY
WindowList(a).PosX = mx - WindowList(a).DragX
WindowList(a).PosY = my - WindowList(a).DragY
WindowList(a).XSpeed = (WindowList(a).XSpeed - WindowList(a).PosX)*4
WindowList(a).YSpeed = (WindowList(a).YSpeed - WindowList(a).PosY)*4
endif
WindowList(a).YSpeed = CurveValue(0,WindowList(a).YSpeed,10)
WindowList(a).XSpeed = CurveValue(0,WindowList(a).XSpeed,10)
if MLKey = 3 then WindowList(a).Drag = 0
next a
endfunction
function DrawMouse()
if InitMouse = 0
mx = Mousex()
my = mousey()
//Setup custom mouse values here.
mx1 = mx+15
my1 = my+15
mx2 = mx+1
my2 = my+25
Init = True
TrailLimit = 3
MouseLimit = 6
InitMouse = 1
CircleSize = 15
endif
//mouse events.. OnPress, OnRelease and WhileHold event.
if MLKey = 3 then MLKey = 0
if MLKey = 2 and mouseclick()=0 then MLKey = 3
if MLKey = 1 then MLKey = 2
if MLKey = 0 and mouseclick()=1 then MLKey = 1
mx = CurveValue(Mousex(),mx,MouseLimit)
my = CurveValue(Mousey(),my,MouseLimit)
mx1 = curvevalue(mx+15,mx1,TrailLimit)
my1 = curvevalue(my+15,my1,TrailLimit)
mx2 = curvevalue(mx+1,mx2,TrailLimit)
my2 = curvevalue(my+25,my2,TrailLimit)
line mx,my,mx1,my1
line mx,my,mx2,my2
line mx1,my1,mx2,my2
if MClick =1 and MLKey <> 1
CircleSmooth = curvevalue(CircleSize,CircleSmooth,10)
circle OldClickX,OldClickY,CircleSmooth
if floor(CircleSmooth)+1=> CircleSize then MClick = 0
endif
if MLKey = 1
MClick = 1
OldClickX = mx
OldClickY = my
CircleSmooth = 0
endif
endfunction
i made this some time ago as a thread on Code Snippets.