Function getControlRectangleForm(Obj As Object) As RECT
Dim Lft As Double, Rgt As Double, top As Double, P As Object, PInsWidth As Double, PInsHeight As Double
Dim K As Double, r As RECT, ppx#
Lft = Obj.Left: top = Obj.top: Set P = Obj.Parent ' Normalement Page, Frame ou UserForm
Do
PInsWidth = P.InsideWidth: PInsHeight = P.InsideHeight ' Le Page en est pourvu, mais pas le Multipage.
If TypeOf P Is MSForms.Page Then Set P = P.Parent ' Prend le Multipage, car le Page est sans positionnement.
K = (P.Width - PInsWidth) / 2: Lft = (Lft + P.Left + K): top = (top + P.top + P.Height - K - PInsHeight)
If Not (TypeOf P Is MSForms.Frame Or TypeOf P Is MSForms.MultiPage) Then Exit Do
Set P = P.Parent
Loop
ppx = (4 / 3) '(4/3)*1.25'pour dudu2
With ActiveWindow.Panes(1)
r.Left = .PointsToScreenPixelsX(Lft) - .PointsToScreenPixelsX(0)
r.top = .PointsToScreenPixelsY(top) - .PointsToScreenPixelsY(0)
r.Right = (r.Left + (.PointsToScreenPixelsX(Obj.Width) - .PointsToScreenPixelsX(0)))
r.Bottom = (r.top + (.PointsToScreenPixelsY(Obj.Height) - .PointsToScreenPixelsY(0)))
r.Bottom = r.Bottom + (((Obj.ListRows + 1.5) * Obj.Font.Size) *ppx)
End With
getControlRectangleForm = r
End Function