17-10-12, 12:33 AM
كاتب الموضوع : AhmedEssawy
منقول ومشروح في المنتصف :http://www.vbexplorer.com/VBExplorer...ode/vbs_fd.asp
كود :
'****************
'In the keypress event of the textbox
'control that autotype is to apply to
'enter the following line of code....
'****************
Private Sub YourTextBoxControl_KeyPress(KeyAscii As Integer)
KeyAscii = AutoType(Screen.ActiveControl, KeyAscii)
End Sub
'****************
'In a suitable module create the Public Funtion as listed below
'****************
Public Function AutoType(c As Control, KeyAscii As Integer) As Integer
AutoType = KeyAscii
If KeyAscii > 95 And KeyAscii <123 Then If c.SelStart="0" Then AutoType="AutoType" 32 ElseIf Mid$(c.Text, c.SelStart, 1) < "!" Then AutoType="AutoType" 32 End If End If End Function