用Hook!
那时不 下级传递 任何鼠标消息!

解决方案 »

  1.   

    不用hook的办法
    对象的click事件里只有一个判断语句,判断全局变量,是真就执行语句,是假就End Sub
      

  2.   

    Dim iKK As Integer
    Private Sub Command1_Click()    Me.Print "现在开始,鼠标失效!"
        Timer1.Enabled = TrueEnd SubPrivate Sub Form_Click()
        
        If iKK <> 10 Then Exit Sub
        Timer1.Enabled = False
        Me.Cls
        Me.Print "现在开始,鼠标有效!"
        
    End SubPrivate Sub Form_Load()
        
        Me.AutoRedraw = True
        Command1.Caption = "开始"
        Timer1.Enabled = False
        Timer1.Interval = 10000
        iKK = 0
        
    End SubPrivate Sub Timer1_Timer()
        
        iKK = iKK + 1
        
    End Sub  需要一个CommandButton和一个Timer。 试试这个吧!不过,你的要求是在太模糊,用这种方法,还可以点击窗体上的其他控件、还可以移动窗体、还可以变化窗体....
      

  3.   

    Private Declare Function ShowCursor Lib "user32" (ByVal bShow As Long) As LongPrivate Sub Command1_Click()
        ShowCursor 0
        'Wait 5 seconds
        t = Timer
        Do: DoEvents: Loop Until Timer > t + 5
        'Show the cursor
        ShowCursor 1
    End Sub
      

  4.   

     
      : dbcontrols  拜托,老乡,为什么老不看清人家的要求呢??“ 鼠标还得是显示的”!!
      

  5.   

    利用CLIPCURSOR它的参数是RECT结构,是一个矩形,通过GETCURSORPOS的到此时鼠标的位置,在将值赋给RECT结构,然后CLIPCURSOR(RECT),释放的话,将RECT的范围设置为屏幕的大小。
      

  6.   

    用个mouse down事件不就行了?一检测到这事件就瞬间无效下窗体
      

  7.   

    试试这么做:
    放入一个Timer控件
    Public Declare Function GetCursorPos Lib "user32" Alias "GetCursorPos" (lpPoint As POINTAPI) As Long  '用来获取当前鼠标位置Public Declare Function SetCursorPos Lib "user32" Alias "SetCursorPos" (ByVal x As Long, ByVal y As Long) As Long  '用来设置鼠标位置Private Type POINT
    x As Long
    y As long
    End TypeDim OldPoint As POINT '记录鼠标先前的位置Dim MouseStop as BooleanPrivate Sub Form_Load()
    MouseStop=Not MouseStop
    Timer1.Interval=10
    Timer1.Enabled=False
    End SubPrivate Sub Form_Click() '放在别的事件里也行
       MousePointer=vbDefault '设置鼠标的指针样式
       GetCursorPos OldPoint  '记录鼠标的位置
       Timer1.Enabled=True    '启动时钟
    End Sub
    Private Sub Timer1.Timer()
    Dim NewX As Integer
    Dim NewY As integerMousePointer=vbDefault 
    NewX=OldPoint.X
    NewY=OldPoint.Y
    SetCursorPos NewX,NewY
    End Sub
      

  8.   

    指定鼠标指针为沙漏或者其他
    在鼠标事件中判断鼠标指针是否为所指定的,如果是就exit sub.
      

  9.   

    指定鼠标指针为沙漏或者其他
    在鼠标事件中判断鼠标指针是否为所指定的,如果是就exit sub.