#Define Quit Inkey=CHR(255,107) Dim Shared As Integer mx,my,mb,anz_win Type WizWindow As Integer id As String title ' As Integer active 'brauchste nicht As Integer x As Integer y As Integer w As Integer h End Type Dim Shared As WizWindow win() Dim Shared As UInteger winZ(50000) Declare Sub InitGUI() Declare Sub DrawGadgets() Declare Sub DrawWindow(id As Integer) declare Sub WinAdd() Screenres 640,480,32 InitGUI() dim shared anz_alloc as uinteger Sub WinAdd() anz_win+=1 if anz_win > anz_alloc then anz_alloc += 25 redim Preserve win(anz_alloc) as WizWindow redim Preserve winZ(anz_alloc) as WizWindow end if With win(anz_win) .id=1 .title="Testwindow-" & Str(anz_win) ' .active=0 'brauchste nicht -> siehe: winActive .x=anz_win * 25 .y=anz_win * 25 .w=300 .h=200 End With winZ(anz_win) = anz_win End Sub Do Getmouse mx,my,,mb 'Das macht man nicht im "Draw"!!! For i As Integer= anz_win to 1 step -1 'rückwerts durchlaufen 'hier mit winZ prüfen If (mx>win(winZ(i)).x And mxwin(winZ(i)).y And my