- Declare Function SetWindowRgn Lib "user32" (ByVal hwnd As Long, ByVal hRgn As Long, ByVal bRedraw As Boolean) As Long
- Declare Function CreateEllipticRgn& Lib "gdi32" (ByVal X1 As Long, ByVal Y1 As Long, ByVal X2 As Long, ByVal Y2 As Long)
- Declare Function DeleteDC Lib "gdi32" (ByVal hdc As Long) As Long
-
- Public Function Oval(forme As Form, Xdurayon As Long, Ydurayon As Long)
- reg = CreateEllipticRgn(Xdurayon, Ydurayon, 0, 0)
- SetWindowRgn forme.hwnd, reg, True
- End Function
-
- on l'utilise ainsi dans un form_load :
- oval me, 300, 100 donne un ovale
-
Declare Function SetWindowRgn Lib "user32" (ByVal hwnd As Long, ByVal hRgn As Long, ByVal bRedraw As Boolean) As Long
Declare Function CreateEllipticRgn& Lib "gdi32" (ByVal X1 As Long, ByVal Y1 As Long, ByVal X2 As Long, ByVal Y2 As Long)
Declare Function DeleteDC Lib "gdi32" (ByVal hdc As Long) As Long
Public Function Oval(forme As Form, Xdurayon As Long, Ydurayon As Long)
reg = CreateEllipticRgn(Xdurayon, Ydurayon, 0, 0)
SetWindowRgn forme.hwnd, reg, True
End Function
on l'utilise ainsi dans un form_load :
oval me, 300, 100 donne un ovale