Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Can the insert/overwrite mode be set in VB? 2

Status
Not open for further replies.

petersJazz

Programmer
Jan 28, 2002
222
EU
I have a form where it would be convienient if when I enter one field the insert/overwrite mode be set to overwrite. That means the default text (in my case "534444435544354434" is 18 hole of golf) should be overwritten.

Is there any other smart way to register result from 18 hole of golf, it need to be easy to put in the numbers, not 5 enter 3 enter ...
 
Hi,

The usual way of 'overwriting' in a textbox is to select to content when the textbox recieves focus (so that when you press a key the text is replaced):
---------------------------------------------------------
Private Sub Text1_GotFocus()
Text1.SelStart = 0
Text1.SelLength = Len(Text1.Text)
End Sub
---------------------------------------------------------
Sunaj
'The gap between theory and practice is not as wide in theory as it is in practice'
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top