# Re: &#189;D¡ãY : textbox &#164;&#164;|3¡§S|3&#164;eak or ¡¥a&#164;¡ê¡¥a¡ã¦Ì¡§i (£¬O&#164;o)

Posted by Yashiro on August 23, 1999 at 18:52:48:

In Reply to: Re: ½D¡ãY : textbox ¤¤|3¡§S|3¤eak or ¡¥a¤¡ê¡¥a¡ã¦Ì¡§i (£¬O¤o) posted by yashiro on August 23, 1999 at 18:23:28:

here is the sample code. others think about yourself. :P

Dim Trigger As Boolean

Private Sub Text1_Change()
If Trigger = True Then
Select Case Len(Text1.Text)
Case 1: Text1.Text = "a"
Case Is > 1
Text1.Text = Left(Text1.Text, Len(Text1.Text) - 1) & "a"
Case 0:
End Select
Text1.SelStart = Len(Text1.Text)
End If
End Sub

Private Sub Text1_KeyPress(KeyAscii As Integer)
If KeyAscii = 32 Then
Trigger = True
End If
End Sub

Follow Ups: