dj_himp
Messages postés2Date d'inscriptionjeudi 24 mars 2005StatutMembreDernière intervention20 mai 2005
-
18 mai 2005 à 14:10
dj_himp
Messages postés2Date d'inscriptionjeudi 24 mars 2005StatutMembreDernière intervention20 mai 2005
-
20 mai 2005 à 08:25
Bonjour tout le monde.
j'ai un probleme, j'aimerai creer une userform ronde sous vba. j'ai chercher sur le forum des codes source et j'en ai trouvé (pour vb) mais je n'arrive pas a le faire fonctionner sous vba.
voila mon code :
Private Declare Function CreateEllipticRgn Lib "gdi32" (ByVal X1 As Long, ByVal Y1 As Long, ByVal X2 As Long, ByVal Y2 As Long) As Long
Private Declare Function SetWindowRgn Lib "user32" (ByVal hWnd As Long, ByVal hRgn As Long, ByVal bRedraw As Boolean) As Long
Private Declare Function FindWindowA Lib "user32" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long
Private Declare Function DeleteObject Lib "gdi32" (ByVal hObject As Long) As Long
Public hWnd As Long
Public hRgn As Long
Private Sub UserForm_initialize()
hWnd = FindWindowA("", UserForm1.Caption)
hRgn = CreateEllipticRgn(0, 0, 300, 300)
SetWindowRgn hWnd, hRgn, True
DeleteObject (hRgn)
End Sub