VBcoders Browse New Submit Contact Sign In

No account? Register free

Forgot password?

The following code draws a gradient on the form, from one color to another. It uses WIN32 API in or

Nir Sofer  (3 Submissions)   Graphics   Visual Basic 4.0 (32-bit)   Unknown Difficulty   Mon 25th February 2002   Mon 8th February 2021

The following code draws a gradient on the form, from one color to another. It uses WIN32 API in order to get the best performances. The

API Declarations


Left As Long
Top As Long
Right As Long
Bottom As Long
End Type

Private Declare Function GetClientRect Lib "user32" (ByVal hwnd As Long, lpRect As RECT) As Long
Private Declare Function CreateSolidBrush Lib "gdi32" (ByVal crColor As Long) As Long
Private Declare Function SelectObject Lib "gdi32" (ByVal hdc As Long, ByVal hObject As Long) As Long
Private Declare Function DeleteObject Lib "gdi32" (ByVal hObject As Long) As Long
Private Declare Function FillRect Lib "user32" (ByVal hdc As Long, lpRect As RECT, ByVal hBrush As Long) 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


Rate The following code draws a gradient on the form, from one color to another. It uses WIN32 API in or (1(1 Vote))
The following code draws a gradient on the form, from one color to another. It uses WIN32 API in or.bas

The following code draws a gradient on the form, from one color to another. It uses WIN32 API in or Comments

No comments yet — be the first to post one!

Post a Comment

0/1000 characters