hey when i try this program ..it trows an error on that e.KeyChar thing..i dont know the reason can u please help me
the error is
Error 1 'System.Windows.Forms.KeyEventArgs' does not contain a definition for 'KeyChar' and no extension method 'KeyChar' accepting a first argument of type 'System.Windows.Forms.KeyEventArgs' could be found (are you missing a using directive or an assembly reference?)
Follow the code above. ASCII Character for negative is 45 so exempt it form validation as he did for back space and I also changed to accept decimal values with period . that has ASCII code as 46.
This vid went viral on Liechtenstein
jacquesgambl36 4 weeks ago
Thanks
PurgeToDeath 1 month ago
thank you. took me a year to get this done.
hoilungly83 3 months ago
Thank you so much. This really helped me out. Nice and simple code.
TheodenN 5 months ago
Wow sorry, i was on my iphone and read the code wrong :( works now :D
lpguitarist06 7 months ago
Thanks! But why is my backspace not working? I went over it several times and i swear i have same as u
lpguitarist06 7 months ago
Thanks........
rajunpatel21 7 months ago
hey when i try this program ..it trows an error on that e.KeyChar thing..i dont know the reason can u please help me
the error is
Error 1 'System.Windows.Forms.KeyEventArgs' does not contain a definition for 'KeyChar' and no extension method 'KeyChar' accepting a first argument of type 'System.Windows.Forms.KeyEventArgs' could be found (are you missing a using directive or an assembly reference?)
sachintha1991 7 months ago
@sachintha1991 I don't know i you solved it yet, but you misspelled it is KeyPressEventArgs
Mitche23 3 months ago
Thanks a lot!
luklew 8 months ago
can you tell how i can read negative values please?
thanks
jorgemaiadin 8 months ago
@jorgemaiadin : if (!Char.IsDigit(input) && input != 8 && input != 46 && input != 45)
Follow the code above. ASCII Character for negative is 45 so exempt it form validation as he did for back space and I also changed to accept decimal values with period . that has ASCII code as 46.
sefaixan 4 months ago
Very helpful.
JakeEricson 10 months ago
hmm. this code interferes with the actual 'calculator' part of my calculator.. even though the code has its own instance!
vlad781 1 year ago
i dont understand why e.KeyChar. What is the "e" for in e.KeyChar
me4u 1 year ago
@me4u
dude read the code :) Once you do it e var stands for KeyPressEventArgs its up there in the void :)
mrskillerishere 1 year ago
Thanks :)
stmarkonius 1 year ago
very very nice man, thanx a lot!
marshalldj 1 year ago