Visual Basic 6.0
Friday, 10 May 2013
Sunday, 31 July 2011
How to make form with round corners
first create a form and then go to the code window
Type:
Type:
0ption explicit
ByVal Y1 As Long, _
Private Declare Function CreateRoundRectRgn _
Lib "gdi32" (by val 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
Private Declare Function SetWindowRgn _
Lib "user32" (ByVal hWnd As Long, _
ByVal hRgn As Long, _
ByVal bRedraw As Boolean) As Long
Public Sub CreateRoundRectFromWindow(ByRef oWindow As Object)
Dim lRight As Long
Dim lBottom As Long
Dim hRgn As Long
With oWindow
lRight = .Width / Screen.TwipsPerPixelX
lBottom = .Height / Screen.TwipsPerPixelY
hRgn = CreateRoundRectRgn(0, 0, lRight, lBottom, 40, 40)
SetWindowRgn .hWnd, hRgn, True
End With
End Sub
Private Sub Form_Load()
CreateRoundRectFromWindow Me
End Sub
Saturday, 30 July 2011
Welcome
Hello Friends this is a new blog related to visual basic 6. I mridul myself is a programmer.
Subscribe to:
Posts (Atom)