In WIndows it works like this:
Code: Select all
Procedure Fenster(typ=0)
Shared released, windowsfenster
If windowsfenster Or typ
If WindowEvent()=#PB_Event_CloseWindow
End
EndIf
If Not typ
x=WindowMouseX(0)
y=WindowMouseY(0)
If x<1 Or x>638 Or y<1 Or y>478
If released=0
released=1
ReleaseMouse(1)
EndIf
Else
If released=1
released=0
ReleaseMouse(0)
MouseLocate(x, y)
EndIf
EndIf
EndIf
EndIf
EndProcedure
WindowMouseX and Y do not contain the real coordinates it seems
