next i
case lbs_verticalcolor ' 垂直过渡色
bluearea = int(barendcolor / &h10000) - int(barstartcolor / &h10000)
greenarea = (int(barendcolor / &h100) and &hff) - (int(barstartcolor / &h100) and &hff)
redarea = (barendcolor and &hff) - (barstartcolor and &hff)
for i = 0 to barrect.bottom
red = int(barstartcolor and &hff) + int(i / (barrect.bottom + 1) * redarea)
green = (int(barstartcolor / &h100) and &hff) + int(i / (barrect.bottom + 1) * greenarea)
blue = int(barstartcolor / &h10000) + int(i / (barrect.bottom + 1) * bluearea)
hpen = createpen(ps_solid, 1, rgb(red, green, blue))
call selectobject(.hdc, hpen)
call movetoex(.hdc, 0, i, 0)
call lineto(.hdc, barrect.right, i)
call deleteobject(hpen)
next i
case lbs_image ' 图像
if barimage.handle <> 0 then
dim barhdc as long
barhdc = createcompatibledc(getdc(0))
selectobject barhdc, barimage.handle
bitblt .hdc, 0, 0, barwidth, barrect.bottom - barrect.top + 1, barhdc, 0, 0, vbsrccopy