Creates a Rounded Rectangular Form.
Creates a Rounded Rectangular Form.
API Declarations
Private Declare Function SetWindowRgn Lib "user32" (ByVal hWnd As Long, ByVal hRgn As Long, ByVal bRedraw As Boolean) As Long
Rate Creates a Rounded Rectangular Form.
(2(2 Vote))
Sub RoundRect(ByVal uObject As Object, ByVal v As Long, ByVal w As Long)
Dim lRight As Long
Dim lBottom As Long
Dim hRgn As Long
With uObject
lRight = .Width / Screen.TwipsPerPixelX
lBottom = .Height / Screen.TwipsPerPixelY
hRgn = CreateRoundRectRgn(0, 0, lRight, lBottom, v, w)
SetWindowRgn .hWnd, hRgn, True
End With
End Sub
Private Sub Form_Load()
RoundRect Me, 40, 40 'Leave it on 40.
End Sub
Creates a Rounded Rectangular Form. Comments
No comments yet — be the first to post one!
Post a Comment