by Juan Carlos San Román (6 Submissions)
Category: Windows API Call/Explanation
Difficulty: Beginner
Date Added: Wed 3rd February 2021
Rating: (7 Votes)
In this project I want to show you a simple way of drawing xp style frame on picture box using api functions. I hope it will be useful for you.
API DeclarationsPrivate Declare Function RoundRect Lib "gdi32" _
(ByVal hDC As Long, ByVal Left As Long, ByVal Top As Long, _
ByVal Right As Long, ByVal Bottom As Long, ByVal EllipseWidth As Long, _
ByVal EllipseHeight As Long) As Long
Private Declare Function LineTo Lib "gdi32" (ByVal hDC As Long, ByVal X As Long, ByVal Y As Long) As Long
Private Declare Function MoveToEx Lib "gdi32" (ByVal hDC As Long, ByVal X As Long, ByVal Y As Long, lpPoint As POINTAPI) As Long
Private Declare Function DrawTextEx Lib "user32" Alias "DrawTextExA" (ByVal hDC As Long, ByVal lpsz As String, ByVal n As Long, lpRect As RECT, ByVal un As Long, lpDrawTextParams As Any) As Long
Private Declare Function SetRect Lib "user32" (lpRect As RECT, ByVal X1 As Long, ByVal Y1 As Long, ByVal X2 As Long, ByVal Y2 As Long) As Long