Als Basis zum herum spielen:
Code
'
' © Frank Abbing für Paules-PC-Forum
' http://www.paules-pc-forum.de/forum/xprofan/
'
$H windows.ph
Declare rect#, region&, x&, y&
Dim rect#, 16
WindowStyle 512 + 26
Cls
~GetWindowRect(%hwnd, rect#)
region& = ~CreateRectRgn(0 ,0, Width(%hwnd), Height(%hwnd))
SetTimer 10
y& = Height(%hwnd)/2
While 1
WaitInput
~ScrollDC(%hdc, -1, 0, 0, 0, region&, rect#)
SetPixel (Width(%hwnd)-2), (Height(%hwnd)/2), RGB(200,200,200)
SetPixel (Width(%hwnd)-2), y&, RGB(0,0,0)
If Rnd(2) = 0
y& = y& + Rnd(4)
Else
y& = y& - Rnd(4)
EndIf
Case y& >= Width(%hwnd): y& = Width(%hwnd)
Case y& <= 0: y& = 0
Case %key=2: BREAK
EndWhile
KillTimer
Dispose rect#
End
Alles anzeigen