VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



'Create a Elliptic Form using CreateEllipticRgn and SetWindowRgn API

by Karthikeyan (187 Submissions)
Category: Windows API Call/Explanation
Compatability: Visual Basic 5.0
Difficulty: Unknown Difficulty
Originally Published: Tue 23rd January 2001
Date Added: Mon 8th February 2021
Rating: (1 Votes)

'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



'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

Download this snippet    Add to My Saved Code

'Create a Elliptic Form using CreateEllipticRgn and SetWindowRgn API Comments

No comments have been posted about 'Create a Elliptic Form using CreateEllipticRgn and SetWindowRgn API. Why not be the first to post a comment about 'Create a Elliptic Form using CreateEllipticRgn and SetWindowRgn API.

Post your comment

Subject:
Message:
0/1000 characters