我想在鼠标移到按钮上的时候改变按钮图片,我按照MSDN上说的做了,key或者index我都设好了,可以还是没用,各位帮帮忙吧

解决方案 »

  1.   

    这些是我看到的,希望对你有帮助,是个user object
    ///////////////
    boolean ib_Captured
    public string down_picturename
    //////////////////
    function ulong SetCapture(ulong hwnd) library "user32.dll"
    function boolean ReleaseCapture() library "user32.dll"
    //////////
    ///当触发clicked后还复为clicked 以前状态string picture_name
    picture_name = this.picturenameif not ib_Captured then
      SetCapture(handle(this))
      ib_Captured=true
       this.picturename= this.down_picturename
    this.down_picturename = picture_name
    else
       ib_Captured = false
       ReleaseCapture()
       this.picturename= this.down_picturename
    this.down_picturename = picture_name
    end if 
    //////////////////////////////
    string picture_name
    picture_name = this.picturename
    if not ib_Captured then
      SetCapture(handle(this))
      ib_Captured=true
       this.picturename= this.down_picturename
    this.down_picturename = picture_nameelse
    /////判断指针是否出界
      if (XPos<0 or YPos<0) or (XPos>=this.Width or YPos>this.Height) then
            ib_Captured = false
            ReleaseCapture()
       this.picturename= this.down_picturename
    this.down_picturename = picture_name
      end if
    end if 
    return 1
      

  2.   

    呵呵,你的toolbar的style属性要设置为1(当然,前提是你要设置好toolbar的图象列表和热图象列表)
      

  3.   

    什么改变图片啊,是不是鼠标没移上去时是灰图,移上去后变彩色的了
    你用两个imagelist控件,分别载入你要的图标
      

  4.   

    对阿,我用了两个imagelist了,该做的都做了,没反应!
      

  5.   

    //对阿,我用了两个imagelist了,该做的都做了,没反应!看我上面的回复了吗?你的toolbar的style属性要设置为1