window=CreateWindow("",0,0,400,300)
Notify WindowBorder(window,1)+", "+WindowBorder(window,2)+", "+WindowBorder(window,3)+", "+WindowBorder(window,4)
;1 - left
;2 - right
;3 - top
;4 - bottom
Function WindowBorder(window,edge)
temp=CreateBank(8)
Select edge
Case 1
PokeInt temp,0,GadgetX(window)
PokeInt temp,4,0
ScreenToClient(QueryObject(window,1),temp)
result=-PeekInt(temp,0)
Case 2
PokeInt temp,0,GadgetX(window)+GadgetWidth(window)
PokeInt temp,4,0
ScreenToClient(QueryObject(window,1),temp)
result=PeekInt(temp,0)-ClientWidth(window)
Case 3
PokeInt temp,0,0
PokeInt temp,4,GadgetY(window)
ScreenToClient(QueryObject(window,1),temp)
result=-PeekInt(temp,4)
Case 4
PokeInt temp,0,0
PokeInt temp,4,GadgetY(window)+GadgetHeight(window)
ScreenToClient(QueryObject(window,1),temp)
result=PeekInt(temp,4)-ClientHeight(window)
End Select
FreeBank temp
Return result
End Function
Notify WindowBorder(window,1)+", "+WindowBorder(window,2)+", "+WindowBorder(window,3)+", "+WindowBorder(window,4)
;1 - left
;2 - right
;3 - top
;4 - bottom
Function WindowBorder(window,edge)
temp=CreateBank(8)
Select edge
Case 1
PokeInt temp,0,GadgetX(window)
PokeInt temp,4,0
ScreenToClient(QueryObject(window,1),temp)
result=-PeekInt(temp,0)
Case 2
PokeInt temp,0,GadgetX(window)+GadgetWidth(window)
PokeInt temp,4,0
ScreenToClient(QueryObject(window,1),temp)
result=PeekInt(temp,0)-ClientWidth(window)
Case 3
PokeInt temp,0,0
PokeInt temp,4,GadgetY(window)
ScreenToClient(QueryObject(window,1),temp)
result=-PeekInt(temp,4)
Case 4
PokeInt temp,0,0
PokeInt temp,4,GadgetY(window)+GadgetHeight(window)
ScreenToClient(QueryObject(window,1),temp)
result=PeekInt(temp,4)-ClientHeight(window)
End Select
FreeBank temp
Return result
End Function