15,905,877 members
Sign in
Sign in
Email
Password
Forgot your password?
Sign in with
home
articles
Browse Topics
>
Latest Articles
Top Articles
Posting/Update Guidelines
Article Help Forum
Submit an article or tip
Import GitHub Project
Import your Blog
quick answers
Q&A
Ask a Question
View Unanswered Questions
View All Questions
View C# questions
View C++ questions
View Javascript questions
View Visual Basic questions
View Python questions
discussions
forums
CodeProject.AI Server
All Message Boards...
Application Lifecycle
>
Running a Business
Sales / Marketing
Collaboration / Beta Testing
Work Issues
Design and Architecture
Artificial Intelligence
ASP.NET
JavaScript
Internet of Things
C / C++ / MFC
>
ATL / WTL / STL
Managed C++/CLI
C#
Free Tools
Objective-C and Swift
Database
Hardware & Devices
>
System Admin
Hosting and Servers
Java
Linux Programming
Python
.NET (Core and Framework)
Android
iOS
Mobile
WPF
Visual Basic
Web Development
Site Bugs / Suggestions
Spam and Abuse Watch
features
features
Competitions
News
The Insider Newsletter
The Daily Build Newsletter
Newsletter archive
Surveys
CodeProject Stuff
community
lounge
Who's Who
Most Valuable Professionals
The Lounge
The CodeProject Blog
Where I Am: Member Photos
The Insider News
The Weird & The Wonderful
help
?
What is 'CodeProject'?
General FAQ
Ask a Question
Bugs and Suggestions
Article Help Forum
About Us
Search within:
Articles
Quick Answers
Messages
Comments by Member 13068046 (Top 9 by date)
Member 13068046
26-Mar-17 14:26pm
View
Sorry, just tried it and that's not it either. Thank you though.
Member 13068046
26-Mar-17 12:03pm
View
Your an absolute star! Thank you so much! That works absolutely brilliantly.
Member 13068046
26-Mar-17 11:53am
View
Hi there, I figured out that if I put e.Handled = true before the MessageBox.Show It works brilliantly. I don't know why but it does.
Thank you so much.
Member 13068046
22-Mar-17 19:56pm
View
Sorry, but if I could discern why the code didn't work I wouldn't be asking for help would I?
With a mechanic you get some sort of feedback from the car that you can describe to them which will help them narrow down the issue (i.e. its making a rattling noise under the bonnet, it keeps stalling, smoke is being ejected out of the back).
I can't possibly do that because I can't even describe the problem other than that the text box still accepts letters and symbols and no message box appears at any time (essentially meaning it has not worked since it has not done anything that I wanted it to do).
By "clearly explained" do you mean clearly explained for you, or clearly explained for me, as I do believe that particular phrasing carries some subjectivity to it. But by all means, please, if you know of a site that explains really well and simply how to code this particular problem, feel free to send me the link. That way I can stop going through the trouble of researching an answer and you can stop going through the trouble of putting antagonizing comments on my question page.
Hope that clarifies things.
Thank you.
Member 13068046
22-Mar-17 9:10am
View
Sorry, but this doesn't work. I tried it and no matter what I did no message box would appear and stop me.
But thank you very much for trying to help. It's greatly appreciated.
Member 13068046
21-Mar-17 21:43pm
View
I'm currently trying to get this to work in visual studio's 2015 but the code keeps giving me an error. Does anyone know why?
private void txt_P1In_KeyPress(object sender, KeyPressEventArgs e)
{
e.Handled = !(Char.IsDigit(e.KeyChar) || e.KeyChar == '\b' || e.KeyChar = '.');
}
Member 13068046
21-Mar-17 21:26pm
View
There are, but I'm a beginner at this and most of the code solutions they show baffle me. This site tends to be good for straight answers hence why I put up the question. Plus the answer I keep coming across:
private void txt_P1In_KeyPress(object sender, KeyPressEventArgs e)
{
e.Handled = !(Char.IsDigit(e.KeyChar) || e.KeyChar == '\b' || e.KeyChar = '.');
}
doesn't work in my code and I have no idea why so an easier or explained solution would be preferable.
Member 13068046
21-Mar-17 19:15pm
View
You were right, the moment I removed them everything worked. Thank you so much!
Member 13068046
21-Mar-17 19:14pm
View
Thank you very much! I didn't spot that.
Show More