Home
Search
 
What's New
Index
Books
Links
Q & A
Newsletter
Banners
 
Feedback
Tip Jar
 
 
 
 
 
 
 
 
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
 
 
 
TitleLimit the text in TextBoxes and ComboBoxes
KeywordsTextBox, ComboBox, limit text
CategoriesControls
 
Use the SendMessage API function to send the controls the EM_LIMITTEXT and CB_LIMITTEXT messages.
 
Private Sub Form_Load()
    SendMessage Text1.hwnd, _
        EM_LIMITTEXT, 4, 0
    SendMessage Combo1.hwnd, _
        CB_LIMITTEXT, 4, 0

    SendMessage Text2.hwnd, _
        EM_LIMITTEXT, 8, 0
    SendMessage Combo2.hwnd, _
        CB_LIMITTEXT, 8, 0
End Sub
 
 
Copyright © 1997-2003 Rocky Mountain Computer Consulting, Inc.   All rights reserved.
  Updated