VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



Creates a Round, Rectangular or a Circle Form

by Cyrus Lacaba (3 Submissions)
Category: Windows API Call/Explanation
Compatability: VB 6.0
Difficulty: Unknown Difficulty
Originally Published: Tue 18th July 2006
Date Added: Mon 8th February 2021
Rating: (1 Votes)

Creates a Round, Rectangular or a Circle Form

API Declarations


(ByVal hWnd As Long, ByVal hRgn As Long, _
ByVal bRedraw As Boolean) As Long

Public Declare Function CreateRoundRectRgn Lib "gdi32" (ByVal x1 As Long, ByVal y1 As Long, ByVal X2 As Long, ByVal Y2 As Long, ByVal x3 As Long, ByVal y3 As Long) As Long

Public Declare Function CreateEllipticRgn Lib "gdi32" _
(ByVal x1 As Long, ByVal y1 As Long, ByVal X2 As Long, _
ByVal Y2 As Long) As Long


Rate Creates a Round, Rectangular or a Circle Form



    
    If blnRecForm = True Then
        SetWindowRgn MyForm.hWnd, CreateRoundRectRgn(x1, y1, (MyForm.Width / 15) - 5, (MyForm.Height / 15) - 5, x3, y3), True
    Else
        SetWindowRgn MyForm.hWnd, CreateEllipticRgn(x1 + 15, y1, (MyForm.Width / 15) - 20, (MyForm.Height / 15) - 15), True
    End If
    
End Sub


Download this snippet    Add to My Saved Code

Creates a Round, Rectangular or a Circle Form Comments

No comments have been posted about Creates a Round, Rectangular or a Circle Form. Why not be the first to post a comment about Creates a Round, Rectangular or a Circle Form.

Post your comment

Subject:
Message:
0/1000 characters