程序运行后,怎么用鼠标托着一个标签控件在一个picture控件里移动阿?

解决方案 »

  1.   

    http://vbboshi.myrice.com/learner/secondary/list/page2.htm
      

  2.   

    大致是:
    private startmove as boolean
    private oldx as single,oldy as singleprivate sub Label1_MouseDown(……)
    if button=1 then
    startmove=true
    oldx=x
    oldy=y
    end if
    end sub private sub Label1_mouseup(……)
    startmove=false
    end subprivate sub Label1_mousemove(……)
    if startmove then
    label1.left=label1.left+(x-oldx)
    label1.top=label1.top+(y-oldy)
    end if
    end sub