CodeItBetter Programming Another VB Programming Blog

How to create fancy oval forms

Posted on January 4, 2009
1
2
3
4
5
6
7
8
9
10
11
'Forms - How to create fancy oval forms
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 Sub Form_Load()
    Dim ReturnVal As Long
    Me.Show
    ReturnVal = SetWindowRgn(Me.hWnd, CreateEllipticRgn(10, 25, 100, 200), True)
End Sub
Filed under: Forms Leave a comment
Comments (0) Trackbacks (0)

No comments yet.


Leave a comment


 

No trackbacks yet.