Results 1 to 9 of 9

Thread: Limiting the amount of text in textbox

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Oct 2003
    Posts
    89

    Cool Limiting the amount of text in textbox

    Hello,

    Quick question is there any property I can alter to limit the amount of text that can be entered in by the user?

    This is for Dates to avoid the "overflow" runtime error.


    Chris

  2. #2

  3. #3
    Supreme User Madboy's Avatar
    Join Date
    Oct 2003
    Location
    England
    Posts
    3,253
    Originally posted by MartinLiss
    You can either use a date mask in a MaskedEdit control or set the MaxLength property of a textbox to whatever you want.
    Is there no limit to setting your own MaxLength? I.e can you have more text than a RTF or is there a memory limit like 32Kb or something?

  4. #4

  5. #5

    Thread Starter
    Lively Member
    Join Date
    Oct 2003
    Posts
    89

    Great!

    thx for the posts it worked, setting the maxlenth to 10

  6. #6
    -= B u g S l a y e r =- peet's Avatar
    Join Date
    Aug 2000
    Posts
    9,629
    limit is 64 k for a textbox... but does it tell you that when loading files bigger than 64 K ?? ohhh....no.... just chops it off at the end and pretends nothing happened
    -= a peet post =-

  7. #7
    Hyperactive Member sw_is_great's Avatar
    Join Date
    Nov 2003
    Posts
    330
    I remember loading big text files (definitely more than 64k)
    when I used to be in college and a newbie to vb(vb5).

    It used to load without giving any error.
    Regards

  8. #8
    -= B u g S l a y e r =- peet's Avatar
    Join Date
    Aug 2000
    Posts
    9,629
    yes, it loads with no errors, but it chops off whatever is after the first 64 k

    sick really... should have given some kind of error...
    -= a peet post =-

  9. #9
    PowerPoster
    Join Date
    Mar 2002
    Location
    UK
    Posts
    4,780
    You may be better off using a date picker control. It does it all for you with a nice diary screen if you wanted it.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width