Visual Basic Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming Languages - MoreVisual Basic Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old November 21st, 2003, 12:01 AM
amidala amidala is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2003
Location: Bukit Kerinchi
Posts: 12 amidala User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Red face Counting no of characters

I have a form that has 6 textboxes for the user to key in the description of an item where these descriptions are based on the type of information...for example:

textbox1 is for item name information
textbox2 is for item size information
textbox3 is for item length information...and so on

The complete description of an item must not exceed 100 characters.

That is the information for item name + size + length +..... cannot be more than 100 characters...

How can i display to the users the counting of each characters that the user type in every boxes...so that the user can estimate their description lenght for each item type? Then when the characters reach 100 the user cannot key in anymore characters in all textboxes.

Please help.....

Reply With Quote
  #2  
Old November 21st, 2003, 08:00 AM
Unkie Unkie is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Oct 2003
Posts: 32 Unkie User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 28 m 27 sec
Reputation Power: 5
In every checkboxe's onChange make something like:
NumChars = Len(Textbox1.Text) + Len(TextBox2.Text) + Le...

Lebel1.Caption = 100 - NumChars & " characters left"

Reply With Quote
  #3  
Old November 22nd, 2003, 04:10 PM
macrado macrado is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Oct 2003
Posts: 64 macrado User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 12 h 11 m 38 sec
Reputation Power: 5
I think Unkie has the right idea - as for stopping the user from entering data after 100 characters have been typed, add in the OnChange method:

if Label1.caption = "0 Character Left"
'remove the last character entered
End If
__________________
~~Macrado~~

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreVisual Basic Programming > Counting no of characters


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway
Stay green...Green IT