Page 2 of 2 FirstFirst 12
Results 41 to 61 of 61

Thread: Numeric Text Box

  1. #41
    Addicted Member
    Join Date
    Apr 2008
    Posts
    193

    Re: Numeric Text Box

    I love this control and have used it in several projects to date.
    However, I am unable to add it to the ToolBox in VS2015 Community edition.
    Can anybody offer any suggestions?
    Any help would be greatly appreciated.
    ...
    If someone helps you, show it by rating their post!
    VB.net Code:
    1. ' These two lines will make your coding life much easier!
    2. Option Explicit On
    3. Option Strict On

    "Check everything. That's what software developers do." jmcilhinney

  2. #42

    Thread Starter
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,222

    Re: Numeric Text Box

    Quote Originally Posted by CodeDabbler View Post
    I love this control and have used it in several projects to date.
    However, I am unable to add it to the ToolBox in VS2015 Community edition.
    Can anybody offer any suggestions?
    Any help would be greatly appreciated.
    I've never used the Community Edition so I don't know if anything is different there than other editions. In other VS 2015 editions, you would first open a Windows Form in the designer, then right-click the desired section of the Toolbox and select "Choose Items", then browse for the DLL the control is defined in and then check the appropriate control. Have you tried that?
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  3. #43
    Addicted Member
    Join Date
    Apr 2008
    Posts
    193

    Re: Numeric Text Box

    Quote Originally Posted by jmcilhinney View Post
    ... then right-click the desired section of the Toolbox and select "Choose Items", then browse for the DLL the control is defined in and then check the appropriate control. Have you tried that?
    I have, but it just does not show up in the toolbox.
    It works in VS 2010Pro as described but in VS2015 Community.
    ...
    If someone helps you, show it by rating their post!
    VB.net Code:
    1. ' These two lines will make your coding life much easier!
    2. Option Explicit On
    3. Option Strict On

    "Check everything. That's what software developers do." jmcilhinney

  4. #44

    Thread Starter
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,222

    Re: Numeric Text Box

    Quote Originally Posted by CodeDabbler View Post
    I have, but it just does not show up in the toolbox.
    It works in VS 2010Pro as described but in VS2015 Community.
    Are you able to add any other controls from non-system assemblies?
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  5. #45
    Addicted Member
    Join Date
    Apr 2008
    Posts
    193

    Re: Numeric Text Box

    Quote Originally Posted by jmcilhinney View Post
    Are you able to add any other controls from non-system assemblies?
    I created a UC in VS2010 Pro.
    I can add it to VS2013 Community and VS2015 Community as described.
    I CAN add yoiurs in VS2013 Community, but not VS2015 Community.
    I can add a reference in the project and use your NumberBox in VS2015Community, just cannot get it in the toolbox.
    Any thoughts or ideas?
    ...
    If someone helps you, show it by rating their post!
    VB.net Code:
    1. ' These two lines will make your coding life much easier!
    2. Option Explicit On
    3. Option Strict On

    "Check everything. That's what software developers do." jmcilhinney

  6. #46

    Thread Starter
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,222

    Re: Numeric Text Box

    Quote Originally Posted by CodeDabbler View Post
    Any thoughts or ideas?
    None I'm afraid.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  7. #47
    Addicted Member
    Join Date
    Apr 2008
    Posts
    193

    Re: Numeric Text Box

    Quote Originally Posted by jmcilhinney View Post
    None I'm afraid.
    As a "backdoor" workaround...
    I can start a new project
    Open the location of the DLL
    Drag the DLL to the Tool Box surface
    Use as control as normal

    The only thing that seems to be missing it the ToolboxBitmap, but that's obviously no big deal.
    ...
    If someone helps you, show it by rating their post!
    VB.net Code:
    1. ' These two lines will make your coding life much easier!
    2. Option Explicit On
    3. Option Strict On

    "Check everything. That's what software developers do." jmcilhinney

  8. #48
    Fanatic Member
    Join Date
    Sep 2006
    Location
    London, UK
    Posts
    817

    Re: Numeric Text Box

    Hi,

    Is there a way to determine if the control is left blank?
    .value returns 0

  9. #49

    Thread Starter
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,222

    Re: Numeric Text Box

    Quote Originally Posted by sgrya1 View Post
    Hi,

    Is there a way to determine if the control is left blank?
    .value returns 0
    Um, it's a TextBox. How would you usually test whether a TextBox is empty?
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  10. #50
    Fanatic Member
    Join Date
    Sep 2006
    Location
    London, UK
    Posts
    817

    Re: Numeric Text Box

    I was just jumping back on to delete my post.

    There is no .text method to see if .text ="" but realised there is a .textlength to check if it's 0.

    Thanks for your control. Very helpful.

  11. #51
    Addicted Member
    Join Date
    Apr 2008
    Posts
    193

    Re: Numeric Text Box

    Quote Originally Posted by sgrya1 View Post
    I was just jumping back on to delete my post.

    There is no .text method to see if .text ="" but realised there is a .textlength to check if it's 0.

    Thanks for your control. Very helpful.
    You may also want to look at the BlankMode Property which accepts 3 Enum vals {Accept|ConvertToZero|Reject}

    If set to Reject, you are unable to leave the control if its value it blank.
    ...
    If someone helps you, show it by rating their post!
    VB.net Code:
    1. ' These two lines will make your coding life much easier!
    2. Option Explicit On
    3. Option Strict On

    "Check everything. That's what software developers do." jmcilhinney

  12. #52

    Thread Starter
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,222

    Re: Numeric Text Box

    Quote Originally Posted by sgrya1 View Post
    I was just jumping back on to delete my post.

    There is no .text method to see if .text ="" but realised there is a .textlength to check if it's 0.

    Thanks for your control. Very helpful.
    Firstly, Text is a property, not a method. Secondly, of course there's a Text property. Text is a member of the Control class so every control has a Text property. Thirdly, I just took another look at the code, which I haven't looked at in a year or two at least, and I saw the NullableValue property, which includes this header:
    vb.net Code:
    1. ''' <summary>
    2.     ''' Gets or sets the numeric value stored in the control.
    3.     ''' </summary>
    4.     ''' <value>
    5.     ''' A null reference if the control is blank; otherwise, a <see cref="Decimal" /> value.
    6.     ''' </value>
    So, why are you asking me this question in the first place? Read the code for yourself. If that's too much trouble, don't use it. I'm willing to help with actual problems.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  13. #53
    Hyperactive Member
    Join Date
    Nov 2013
    Posts
    292

    Re: Numeric Text Box

    I have this tool installed in a VB2013 solution. I created a new solution and the tool doesn't appear in the toolbox and I don't see it in the list when I try to add it. Have the .vb file downloaded. How do I get the tool into my new solution toolbox?

  14. #54

    Thread Starter
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,222

    Re: Numeric Text Box

    Quote Originally Posted by larrycav View Post
    I have this tool installed in a VB2013 solution. I created a new solution and the tool doesn't appear in the toolbox and I don't see it in the list when I try to add it. Have the .vb file downloaded. How do I get the tool into my new solution toolbox?
    I just tested to make absolutely sure that it would work as I expected and it did. Here's what I did:

    1. Downloaded both the NumberBox and SimpleNumberBox code files from post #1 in this thread.
    2. Created a new Windows Forms Application project in VS 2013.
    3. Right-clicked the project in the Solution Explorer and selected Add -> Existing Item.
    4. Navigated to and selected the two downloaded code files.
    5. Built the project.

    After that, I opened the Toolbox and the two controls were added in a new section at the top.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  15. #55
    Hyperactive Member
    Join Date
    Nov 2013
    Posts
    292

    Re: Numeric Text Box

    Quote Originally Posted by jmcilhinney View Post
    I just tested to make absolutely sure that it would work as I expected and it did. Here's what I did:

    1. Downloaded both the NumberBox and SimpleNumberBox code files from post #1 in this thread.
    2. Created a new Windows Forms Application project in VS 2013.
    3. Right-clicked the project in the Solution Explorer and selected Add -> Existing Item.
    4. Navigated to and selected the two downloaded code files.
    5. Built the project.

    After that, I opened the Toolbox and the two controls were added in a new section at the top.
    Thank you!

    I installed simplenumberbox because that's what I have been using in another project. What is the difference between the that and numberbox?

  16. #56

    Thread Starter
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,222

    Re: Numeric Text Box

    Quote Originally Posted by larrycav View Post
    What is the difference between the that and numberbox?
    From post #1:
    I've attached the class itself and a solution including the class in a DLL and a test application for putting the control through its paces. I've also included a much simpler class for those with simpler needs.
    Less functionality but less complexity.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  17. #57
    Hyperactive Member
    Join Date
    Nov 2013
    Posts
    292

    Re: Numeric Text Box

    Quote Originally Posted by jmcilhinney View Post
    From post #1:Less functionality but less complexity.
    Thank you.

  18. #58
    Fanatic Member
    Join Date
    Oct 2009
    Posts
    534

    Re: Numeric Text Box

    i dont know how can i use it
    i add SimpleNumberBox.vb to my project and add textbox to the forum
    but it still can type letters

  19. #59

    Thread Starter
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,222

    Re: Numeric Text Box

    Quote Originally Posted by new1 View Post
    i dont know how can i use it
    i add SimpleNumberBox.vb to my project and add textbox to the forum
    but it still can type letters
    You use it like any other control, i.e. you drag it from the Toolbox onto your form. If you add a TextBox to your form then of course you can type letters into it. If you want to use a SimpleNumberBox then you need to add a SimpleNumberBox, not a TextBox.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  20. #60
    Fanatic Member
    Join Date
    Oct 2009
    Posts
    534

    Re: Numeric Text Box

    very good tool
    thanks alot for it

  21. #61

    Thread Starter
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,222

    Re: Numeric Text Box

    Quote Originally Posted by new1 View Post
    very good tool
    thanks alot for it
    Here to help.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

Page 2 of 2 FirstFirst 12

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