VB打造超酷个性化菜单(六)[4]

[入库:2005年8月18日] [更新:2007年3月24日]

本文简介:选择自 goodname008 的 blog

                    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

本文关键:VB XP 个性化 风格 菜单
  相关方案
Google
 

本站最佳浏览方式为 分辨率 1024x768 IE 6.0(或更高版本的 IE浏览器)

go top