call command1_click调用的时候总是会"嘣"的一声!怎样去掉啊?

解决方案 »

  1.   

    没有错误的.我是在text的keydown里写的!
      

  2.   

    控件面板-->声音和音频设备-->声音下的声音全选无试试
      

  3.   

    这样的吗?
    Option ExplicitPrivate Sub Command1_Click()
        DoEvents
    End SubPrivate Sub Text1_KeyDown(KeyCode As Integer, Shift As Integer)
        Call Command1_Click
    End Sub
    貌似没有声音
      

  4.   


    从WINDOWS设置上解决,搜一搜,应该可以的……
      

  5.   

    那是回车引起的,把它过滤掉
    Private Sub Text1_KeyPress(KeyAscii As Integer)
        If KeyAscii = 13 Then
            KeyAscii = 0
        End If
    End Sub
      

  6.   

    Private Sub Text1_KeyPress(KeyAscii As Integer) 
        If KeyAscii = 13 Then call command1_click
            
    End Sub这是代码
      

  7.   


    Private Sub Text1_KeyPress(KeyAscii As Integer)
        If KeyAscii = 13 Then
            KeyAscii = 0
            Call Command1_Click
        End If
    End Sub
      

  8.   

    估计你没有打开form的key_preview选项,应该先让form拦截这个键,然后用peekmessage这个api remove掉。
      

  9.   


    我的是vb6.0按你的思想改成,还是有声音!以下是代码
    Private Sub Text1_KeyDown(KeyCode As Integer, Shift As Integer)
        If KeyCode = 13 Then
            KeyCode = 0
            Call Command1_Click
        End If
    End Sub
      

  10.   

    key_press事件,不是key_down
    看回帖要认真