Bonjour,
Je te remercie
nhervagault, mais j'ai réussi grâce à cette méthode :
<System.Runtime.InteropServices.DllImportAttribute("gdi32.dll", SetLastError:=True)> Private Function CreateRoundRectRgn(ByVal X1 As Int32, ByVal Y1 As Int32, ByVal X2 As Int32, ByVal Y2 As Int32, ByVal X3 As Int32, ByVal Y3 As Int32) As IntPtr
End Function
<System.Runtime.InteropServices.DllImportAttribute("gdi32.dll", SetLastError:=True)> Private Function DeleteObject(ByVal hObject As IntPtr) As Int32
End Function
<System.Runtime.InteropServices.DllImportAttribute("user32.dll", SetLastError:=True)> Private Function SetWindowRgn(ByVal hwnd As IntPtr, ByVal hRgn As IntPtr, ByVal bRedraw As Boolean) As Int32
End Function
Public Sub RoundCorners(ByRef tabcontrol As System.Windows.Forms.Form, Optional ByVal Angle As System.Byte = 15)
With tabcontrol
Dim lRet As IntPtr = CreateRoundRectRgn(0, 0, .Width, .Height, Angle, Angle)
SetWindowRgn(.Handle, lRet, True)
DeleteObject(lRet)
End With
End Sub
mais cela efface la bordure du tabcontrol, comment faire pour la refaire apparaitre ?
merci