Basic Univers
Procedure.l GetWindowSize(type.l)
GetWindowRect_(WindowID(), @Taille_Fenetre.RECT)
Largeur_Fenetre = Taille_Fenetre\Right - Taille_Fenetre\Left
Hauteur_Fenetre = Taille_Fenetre\Bottom - Taille_Fenetre\top
Largeur_Bordure =(Largeur_Fenetre - WindowWidth()) / 2
Hauteur_Titre = Hauteur_Fenetre - WindowHeight() - Largeur_Bordure
Select type
Case 1
ProcedureReturn Largeur_Bordure
Case 2
ProcedureReturn Hauteur_Titre
Case 3
ProcedureReturn Largeur_Fenetre
Case 4
ProcedureReturn Hauteur_Fenetre
EndSelect
EndProcedure
If OpenWindow(0, 0, 0, 500, 500, #PB_Window_SystemMenu | #PB_Window_MinimizeGadget, "TEST")
If CreateGadgetList(WindowID())
ScrollAreaGadget(0, 0, 0, 450, 450, 1000, 1000, 5, #PB_ScrollArea_BorderLess)
CloseGadgetList()
EndIf
If CreateStatusBar(0, WindowID())
AddStatusBarField(100)
AddStatusBarField(100)
EndIf
Repeat
PosScrollH.l = GetScrollPos_(GadgetID(0), #SB_HORZ)
PosScrollV.l = GetScrollPos_(GadgetID(0), #SB_VERT)
Largeur.l = GetWindowSize(1)
Hauteur.l = GetWindowSize(2)
MulotX = PosScrollH + WindowMouseX()- Largeur
MulotY = PosScrollV + WindowMouseY()- Hauteur
StatusBarText(0, 0, Str(PosScrollH)+" - " + Str(PosScrollV), #PB_StatusBar_Center)
StatusBarText(0, 1, Str(MulotX)+" - " + Str(MulotY), #PB_StatusBar_Center)
Until WaitWindowEvent() = #PB_EventCloseWindow
EndIf
End