急,请问如何让commond这个键点第一下之后隐藏,但按Enter键后commond这个键同样起作用 请把这条命令帮我写一下,谢谢!

解决方案 »

  1.   

    但按Enter键后commond这个键同样起作用
    //
    隐藏了还再哪按enter?窗体吗?
      

  2.   

    //请问如何让commond这个键点第一下之后隐藏
    Private Sub Command4_Click()
        Command4.Visible = False
    End Sub//按Enter键后commond这个键同样起作用 
    Enter是在哪個事件發生的﹖
    if keyascii=13 then
        Command4_Click
    end if
      

  3.   

    Private Sub Command4_Click()
        Command4.move 9879,7987,8798,7987
    End Sub
      

  4.   

    Option ExplicitPrivate Sub Command1_Click()
        Command1.Visible = False
        Print "Command1_Click"
    End SubPrivate Sub Form_KeyPress(KeyAscii As Integer)
        If KeyAscii = vbKeyReturn Then Call Command1_Click
    End SubPrivate Sub Form_Load()
        Me.KeyPreview = True
        Me.AutoRedraw = True
    End Sub
      

  5.   


    Private Sub Command1_Click()
    Command1.Enabled = False
    End Sub
    Private Sub Text1_KeyPress(KeyAscii As Integer)
     If KeyAscii = 13 Then Command1.Enabled = True
    End Sub不行的话,来打我!!!哈哈
      

  6.   

    Dim Cleft, Ctop, Cwidth, Cheight
    Private Sub Command1_Click()
    'Command1.Enabled = False
     'Command1.Value = False
     Cleft = Command1.Left
     Ctop = Command1.Top
     Cwidth = Command1.Width
     Cheight = Command1.Height
     Command1.Move 99999, 99999, 0, 0
    End Sub
    Private Sub Text1_KeyPress(KeyAscii As Integer)
     'If KeyAscii = 13 Then Command1.Enabled = True
     If KeyAscii = 13 Then
      Command1.Move Cleft, Ctop, Cwidth, Cheight
     End If
    End Sub
    :(用这个吧,刚才没有看清题,我又改过了
      

  7.   

    Dim Cleft, Ctop, Cwidth, Cheight, Cn
    Private Sub Command1_Click()
     Cleft = Command1.Left
     Ctop = Command1.Top
     Cwidth = Command1.Width
     Cheight = Command1.Height
     Command1.Move 9999, 9999, 0, 0
     Command2.SetFocus
    End Sub
    Private Sub Command2_Click()
     Command1.Move Cleft, Ctop, Cwidth, Cheight
    End Sub
    Private Sub Form_Load()
     Command2.Move 9999, 9999, 0, 0
    End Sub我真是晕,用这个吧,:(
      

  8.   

    Private Sub Command1_Click()
    Command1.Visible = FalseEnd SubPrivate Sub Form_KeyPress(KeyAscii As Integer)
    If KeyAscii = 13 Then Command1.Visible = True
    End Sub============================
    已测试,没有问题的。
    楼主只要隐藏,楼上的写Enabled不能满足要求的啊
      

  9.   

    上面form里面的代码改为
    If KeyAscii = 13 Then Command1_Click