'Create a Elliptic Form using CreateEllipticRgn and SetWindowRgn API
'Create a Elliptic Form using CreateEllipticRgn and SetWindowRgn API
API Declarations
Private Declare Function SetWindowRgn Lib "user32" (ByVal hWnd As Long, ByVal hRgn As Long, ByVal bRedraw As Boolean) As Long
Private Declare Function DeleteObject Lib "gdi32.dll" (ByVal hObject As Long) As Long
Rate 'Create a Elliptic Form using CreateEllipticRgn and SetWindowRgn API
(2(2 Vote))
'http://www.geocities.com/marskarthik
'http://marskarthik.virtualave.net
'Email: [email protected]
Private Sub Command1_Click()
End
End Sub
Private Sub Form_Load()
Dim fwidth As Long, fheight As Long
Dim rval As Long, nhwnd As Long
fwidth = Me.Width / Screen.TwipsPerPixelX
fheight = Me.Height / Screen.TwipsPerPixelY
'Create Elliptic Region
'nhwnd = CreateEllipticRgn(0, 0, fwidth, fheight)
'Create Circular Region
nhwnd = CreateEllipticRgn(0, 0, fheight, fheight)
'Set Created Elliptic Region on form
rval = SetWindowRgn(Me.hWnd, nhwnd, True)
rval = DeleteObject(nhwnd)
End Sub
'Create a Elliptic Form using CreateEllipticRgn and SetWindowRgn API Comments
No comments yet — be the first to post one!
Post a Comment