Home
Search
 
What's New
Index
Books
Links
Q & A
Newsletter
Banners
 
Feedback
Tip Jar
 
 
 
 
500MB 27GB Web Hosting - $9.95/Month
 
 
 
 
 
Old Pages
 
Old Index
Site Map
What's New
 
Books
How To
Tips & Tricks
Tutorials
Stories
Performance
Essays
Links
Q & A
New in VB6
Free Stuff
Pictures
 
 
 
TitleMake a TextBox automatically capitalize input
Keywordsuppercase, upper case, capitalize, TextBox, input
CategoriesControls
 
Make the TextBox's Change event handler capitalize the text. Save and restore the SelStart property so resetting the value does not move the insertion position.
 
Private Sub Text1_Change()
Dim old_pos As Integer

    old_pos = Text1.SelStart
    Text1.Text = UCase(Text1.Text)
    Text1.SelStart = old_pos
End Sub
 
Formatted by Neil Crosby
 
 
Copyright © 1997-2003 Rocky Mountain Computer Consulting, Inc.   All rights reserved.
  Updated