| |
|
|
RudiB. | Hello together,
Have time a Tasterwippe gebastelt....
windowstyle 30
Window 100,100 -300,200
Declare bs#,posx%,posa%
Dim bs#,16'
Def @GetWindowRect(2) !"USER32", "GetWindowRect"
Def @ScreenToClient(2) !"USER32","ScreenToClient"
CLS
Var a&=create("button",%hwnd,"- Wippe +",100,100,100,30)
While 1
Waitinput
If getfocus(a&)
posx%=%mousex
@GetWindowRect(a&,bs#)
@ScreenToClient(%hwnd,bs#)
@ScreenToClient(%hwnd,bs#+8)
posa%=Long(bs#,0)+(Long(bs#,4)/2)
setfocus(%Hwnd)
locate 7,17
If posx%<posa%
print "minus"
Else
print " plus"
Endif
EndIf
EndWhile
|
|
|
| |
|
|