在Form里用MouseMove中SetCapture(),计算mouse的位置,设置button和label的visible.就可以了。
    20分太少了,否则就给你写个例子了。

解决方案 »

  1.   

    捕捉 MouseExit 事件   
           
    MouseDown、MouseUp、MouseMove。VB 似乎提供了很好的 Mouse 事件。但好象还缺少什么!对!还差 MouseExit(鼠标移出)事件。在 VB 中,我们要捕捉 MouseExit 事件,必须用 API 函数:
    Private Declare Function SetCapture Lib "user32" (ByVal hWnd As Long) As Long
    Private Declare Function ReleaseCapture Lib "user32" () As Long
    然后,我们可以在控件(以 Picture1 为例)的 MouseMove 事件上加上以下代码:With Picture1 'Change this to the name of the control
    If Button = 0 Then
    If (X < 0) Or (Y < 0) Or (X > .Width) Or (Y > .Height) Then
    'Mouse pointer is outside button, so let other controls receive
    'mouseevents too:
    ReleaseCapture
    ' 放入鼠标离开的代码
    Else
    ' Mouse pointer is over button, so we'll capture it, thus
    ' we'll receive mouse messages even if the mouse pointer is
    ' not over the button
    SetCapture .hwnd' 放入鼠标进入的代码
    End If 
      

  2.   

    你可以试一下将LAB显示到上一层上来呀。你也可以用它的确发事件看此按键是否得到了焦点。好好看一下控件所提供的事件。
      

  3.   

    我给你一个例子吧.
    原理和dbcontrols的一样.
      

  4.   

    My Email: [email protected]
    谢谢大家啊
      

  5.   

    To :dbcontrols(泰山__帮助你使我感到快乐.)  你觉得  那段代码 应该放在那个事件中呢???
      

  6.   

    thank you very much  TO:ljren_t(立志)  
      

  7.   

    不用客气,这种方法也有Bug,热键,模式窗口等对它都有影响.不好解决:).