VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



Create a circular form

by Anonymous (267 Submissions)
Category: Custom Controls/Forms/Menus
Compatability: Visual Basic 4.0 (32-bit)
Difficulty: Unknown Difficulty
Originally Published: Tue 26th January 1999
Date Added: Mon 8th February 2021
Rating: (1 Votes)

Create a circular form

API Declarations


Private Declare Function SetWindowRgn Lib "user32" (ByVal hWnd As Long, ByVal hRgn As Long, ByVal bRedraw As Long) As Long

Rate Create a circular form



Private Sub Form_Load()
    Dim lngRegion As Long
    Dim lngReturn As Long
    Dim lngFormWidth As Long
    Dim lngFormHeight As Long
    
    lngFormWidth = Me.Width / Screen.TwipsPerPixelX
    lngFormHeight = Me.Height / Screen.TwipsPerPixelY
    lngRegion = CreateEllipticRgn(0, 0, lngFormWidth, lngFormHeight)
    lngReturn = SetWindowRgn(Me.hWnd, lngRegion, True)
End Sub

Download this snippet    Add to My Saved Code

Create a circular form Comments

No comments have been posted about Create a circular form. Why not be the first to post a comment about Create a circular form.

Post your comment

Subject:
Message:
0/1000 characters