When we conducting data entry, maybe we want when this control got focus existing text at the control have been Selected all. with this tips we nededn't ahead vanishing which have text. we can making function for this matter like this
code:
------------Cut Here-----------------------
Public Sub SelectAll(EditCtr As Control)
with EditCtr
.SelStart = 0
.SelLength = Len(EditCtr.Text)
.SetFocus
End With
End Sub
Usage sample:
Write at GotFocus event on input control:
call SelectAll
------------Finish--------------------------
SELECT ALL TEXT WHEN GOT FOCUS [VB 6.0 TIPS]
Diposting oleh Admin | Monday, June 30, 2008 | Vb tips and trick | 0 komentar »
Subscribe to:
Post Comments (Atom)
0 komentar
Post a Comment