Visual basic validating odd data input datingdiary org
If it returns True then you'll be parsing it a second time. [Edit] Shoot, when I first read your post, I didn't see the reply. I'll wait to see your response to jmcilhinney's post before I suggest anything.
Displaying the input value and asking the user to confirm the value before committing it can help, but beyond that, you can do little to validate this type of input—anything the user enters can pass through the door. The value must pass a few tests before the code allows it to pass through.
When you test the current number you would append it to the appropriate string depending on whether it's odd or even.
If the string to which you are appending is not empty then append a comma and a space first.
As developer, I belive we all have those nice controls ideas, but or we forget or we just don´t have time to implement it.
This is a very useful control, and I will definely take it. Please vote for the article and check back in a few days as i've just updated it and it should be changed in a few days, the new version is twice as good as the old. 2) By blocking unwanted keys you also prevent the use of copy/paste using the keyboard. 3) Even though copy&paste is not possible using the keyboard, you didn't take into account that there are other ways to perform copy&paste so it's very easy to bring letters into textbox that's supposed to only hold numbers.