Page 3 of 3 FirstFirst 123
Results 81 to 89 of 89

Thread: VB - An ActiveX control which restricts a textbox to numbers

  1. #81

    Thread Starter
    Former Admin/Moderator MartinLiss's Avatar
    Join Date
    Sep 1999
    Location
    San Jose, CA
    Posts
    33,427

    Re: VB - An ActiveX control which restricts a textbox to numbers

    I'm sorry but I have no experience with Vista. Perhaps you should create a new thread in the Visual Basic 6 and Earlier forum.

  2. #82
    Fanatic Member
    Join Date
    Sep 2006
    Location
    London, UK
    Posts
    816

    Re: VB - An ActiveX control which restricts a textbox to numbers

    Sorry. My mistake. I had the incorrect .ocx version registered on the vista computer.

  3. #83
    Next Of Kin baja_yu's Avatar
    Join Date
    Aug 2002
    Location
    /dev/root
    Posts
    5,989

    Re: VB - An ActiveX control which restricts a textbox to numbers

    Found a bug. Run the Test project (all defaults), type 222.333 then go to the decimal point and delete it (backspace or delete), the text changes to 450.5

  4. #84

    Thread Starter
    Former Admin/Moderator MartinLiss's Avatar
    Join Date
    Sep 1999
    Location
    San Jose, CA
    Posts
    33,427

    Re: VB - An ActiveX control which restricts a textbox to numbers

    I'm not sure what test project you mean, and by default the maximum decimals are set to 2, so you can't type 222.333, but even if I set MaxDecimals to 3 and I do as you say I get 222333.

  5. #85
    Next Of Kin baja_yu's Avatar
    Join Date
    Aug 2002
    Location
    /dev/root
    Posts
    5,989

    Re: VB - An ActiveX control which restricts a textbox to numbers

    I just downloaded the project from the first post, ran it (NumberBox.vbg) without changin anything. I happens every time. It could be the max decimal thing, I didn't change anything there either.

    Oh. I just now noticed it has max and min value properties. It was changing based on that. In the attached project they are set to -19 and 450.5. That's why it was chaning it. My appologies.
    Last edited by baja_yu; Jul 29th, 2010 at 03:27 PM.

  6. #86

  7. #87
    Lively Member Phantom1's Avatar
    Join Date
    Nov 2011
    Posts
    64

    Re: VB - An ActiveX control which restricts a textbox to numbers

    This control is awesome and saves a lot of coding. It is great work. Thanks for it. Does it have a MaxLength property like for TextBox? How to allow commas to be typed in? E.g. 3,200.00 or 1,000,000.00, i.e. a comma separator for each three digits starting from the decimal point and going to the left, given that the decimal separator is a period.
    Last edited by Phantom1; Dec 25th, 2011 at 11:49 AM.
    Learning to Program on Earth until I go into Outer Space...

  8. #88

    Thread Starter
    Former Admin/Moderator MartinLiss's Avatar
    Join Date
    Sep 1999
    Location
    San Jose, CA
    Posts
    33,427

    Re: VB - An ActiveX control which restricts a textbox to numbers

    Thanks.

    The current version of the control does not allow adding commas as thousands separators so if you need them in a report or something my suggestion would be to use Format().

    I'm not promising to make the change but if I were to allow the use of thousand separators would you you want to be able to type them in, or would you like the control to add them automatically?

  9. #89
    Lively Member Phantom1's Avatar
    Join Date
    Nov 2011
    Posts
    64

    Re: VB - An ActiveX control which restricts a textbox to numbers

    An option to allow thousands separators, and then one to add them automatically or not (i.e. allow them to be typed).
    Learning to Program on Earth until I go into Outer Space...

Page 3 of 3 FirstFirst 123

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