Code : Tout sélectionner
ScreenX = GetSystemMetrics_(#SM_CXSCREEN)
ScreenY = GetSystemMetrics_(#SM_CYSCREEN)
If OpenWindow(Fenetre, 0, 0, 100, 100, #PB_Window_SystemMenu | #PB_Window_MinimizeGadget | #PB_Window_ScreenCentered, "Bords 'collants'")
EndIf
Repeat
WinX = WindowX()
WinY = WindowY()
If WinX < 0
MoveWindow(0,WinY)
EndIf
If WinX < 20
MoveWindow(0,WinY)
EndIf
If WinY < 0
MoveWindow(WinX,0)
EndIf
If WinY < 20
MoveWindow(WinX,0)
EndIf
If WinX + 115 > ScreenX
MoveWindow(ScreenX - 115,WinY)
EndIf
If WinX + 115 > ScreenX - 20
MoveWindow(ScreenX - 115,WinY)
EndIf
If WinY + 125 > ScreenY
MoveWindow(WinX,ScreenY - 125)
EndIf
If WinY + 125 > ScreenY - 20
MoveWindow(WinX,ScreenY - 125)
EndIf
Until WaitWindowEvent() = #PB_Event_CloseWindow
2 - Si quelqu'un pouvait me troeuver l'ancien code.... ce serait sympa