'exemple la même (l'original)en macro4
' Sub NocaptionMacro4(usf)
'patricktoulon extrait du tutoriel patricktoulon sur les api en macro4
'Dim insideRect As Long, ptopx#, InsideTop#, InsideLeft#, InsidWidth#, InsidHeight#, insideMarge#
'With ActiveWindow.ActivePane: ptopx = (.PointsToScreenPixelsX(72 / (.Parent.Zoom / 100)) - .PointsToScreenPixelsX(0)) / 72: End With
'insideMarge = Round((usf.Width - usf.InsideWidth) * ptopx) - 1
'InsideLeft = Round(((usf.Width - usf.InsideWidth) / 2) * ptopx)
'InsideTop = Round((usf.Height - usf.InsideHeight) * ptopx) - insideMarge
'InsidWidth = Round(usf.InsideWidth * ptopx) + InsideLeft
'InsidHeight = Round(usf.InsideHeight * ptopx) + InsideTop + insideMarge
'hWnd = ExecuteExcel4Macro("CALL(""user32"",""GetActiveWindow"",""JCC"")") 'api GetActiveWindow
'insideRect = ExecuteExcel4Macro("CALL(""gdi32"",""CreateRoundRectRgn"",""JJJJJJJ""," & InsideLeft & ", " & InsideTop & ", " & InsidWidth & ", " & InsidHeight & ", " & 0 & ", " & 0 & ")")
'ExecuteExcel4Macro ("CALL(""user32"",""SetWindowRgn"",""JJJJ""," & hWnd & ", " & insideRect & ", " & 1 & ")")
'ExecuteExcel4Macro ("CALL(""gdi32"",""DeleteObject"",""JJ""," & insideRect & ")")
'End Sub