Code: Alles auswählen
ww=800
wh=600
style | #PB_Window_ScreenCentered
style | #PB_Window_SystemMenu
style | #PB_Window_MinimizeGadget
hWin=OpenWindow(0, 50,100,ww,wh, "",style) :: AddKeyboardShortcut(0,#PB_Shortcut_Escape,10)
For i=0 To 20
For k=0 To 20
ButtonGadget(#PB_Any,10+i*30,10+k*20,25,15,"..")
Next
Next
OpenWindow(1,10,20,10,10,"",#PB_Window_BorderLess,hWin):SetWindowColor(1,$000000)
OpenWindow(2,10,40,10,10,"",#PB_Window_BorderLess,hWin):SetWindowColor(2,$000000)
OpenWindow(3,10,60,10,10,"",#PB_Window_BorderLess,hWin):SetWindowColor(3,$000000)
OpenWindow(4,10,80,10,10,"",#PB_Window_BorderLess,hWin):SetWindowColor(4,$000000)
AddWindowTimer(0,1,20)
Repeat
event=WaitWindowEvent(100)
em=EventMenu()
Select event
Case #PB_Event_CloseWindow
quit=1
Case #PB_Event_Menu
Select em
Case 10
quit=1
EndSelect
Case #WM_MOUSEMOVE
x1 = 150
y1 = 150
x2 = WindowMouseX(0)
y2 = WindowMouseY(0)
ResizeWindow(1, DesktopMouseX()-(x2-x1),DesktopMouseY()-(y2-y1), x2-x1, 2 ) ; top line
ResizeWindow(2, DesktopMouseX()-(x2-x1),DesktopMouseY() , x2-x1, 2 ) ; bottom line
ResizeWindow(3, DesktopMouseX()-(x2-x1),DesktopMouseY()-(y2-y1), 2, y2-y1 ) ; left line
ResizeWindow(4, DesktopMouseX() ,DesktopMouseY()-(y2-y1), 2, y2-y1+1) ; right line
Case #PB_Event_Timer
For win=1 To 4
StartDrawing(WindowOutput(win))
For x=0 To WindowWidth(win)-1
For y=0 To WindowHeight(win)-1
c=RGB(Random(255),Random(255),Random(255))
Plot(x,y,c)
Next
Next
StopDrawing()
Next
EndSelect
Until quit
