Added: 1 year ago
From: CharnyCoding
Views: 11,435
Sort by time | Sort by thread (beta)

Link to this comment:

Share to:

All Comments (18)

Sign In or Sign Up now to post a comment!
  • This vid went viral on Liechtenstein

  • Thanks

  • thank you. took me a year to get this done.

  • Thank you so much. This really helped me out. Nice and simple code.

  • Wow sorry, i was on my iphone and read the code wrong :( works now :D

  • Thanks! But why is my backspace not working? I went over it several times and i swear i have same as u

  • Thanks........

  • 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.KeyEvent­Args' does not contain a definition for 'KeyChar' and no extension method 'KeyChar' accepting a first argument of type 'System.Windows.Forms.KeyEvent­Args' could be found (are you missing a using directive or an assembly reference?)

  • @sachintha1991 I don't know i you solved it yet, but you misspelled it is KeyPressEventArgs

  • Thanks a lot!

  • can you tell how i can read negative values please?

    thanks

  • @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.

  • Very helpful.

  • hmm. this code interferes with the actual 'calculator' part of my calculator.. even though the code has its own instance!

  • i dont understand why e.KeyChar. What is the "e" for in e.KeyChar

  • @me4u

    dude read the code :) Once you do it e var stands for KeyPressEventArgs its up there in the void :)

  • Thanks :)

  • very very nice man, thanx a lot!

Loading...
Alert icon
0 / 00Unsaved Playlist Return to active list
    1. Your queue is empty. Add videos to your queue using this button:
      or sign in to load a different list.
    Loading...Loading...Saving...
    • Clear all videos from this list
    • Learn more