点了textbox1中的文字,文字后消失 X分钟后文字重新出现
我想要的效果是,当我点了textbox1中的文字发生一个click事件textbox1中的文字消失 ,或者是当textbox1获得焦点的时候,里边的字体消失,我现在想让他失去焦点,之后textbox1中没有文字,当过了X分钟之后文字重新出现
我现在换有一个问题,当我在textbox1中输入了内容,当我在重新点这个textbox1的时候里边的文字又没了,就是说上次我输入的东西丢了,我该怎么解决这个问题,

解决方案 »

  1.   

    Option Explicit
        Dim sj As StringPrivate Sub Command1_Click()
        Text1 = sj
    End SubPrivate Sub Form_Load()
        Timer1.Interval = 60000
        Timer1.Enabled = False
    End SubPrivate Sub Text1_GotFocus()
        sj = Text1.Text
        Text1.Text = ""
        Timer1.Enabled = True
    End SubPrivate Sub Text1_KeyPress(KeyAscii As Integer)
        If KeyAscii = 13 Then
            sj = Text1.Text
            Text1.Text = ""
            Timer1.Enabled = True
        End If
    End SubPrivate Sub Timer1_Timer()
        Text1 = sj
        Timer1.Enabled = False
    End Sub