Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. Simple Question

Simple Question

Scheduled Pinned Locked Moved C#
questiontutorial
3 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    Mazdak
    wrote on last edited by
    #1

    I want to type cast the text in text box to integer? Another guestion is that how to set text box tht the user can only type numbers into it? Mazy "So,so you think you can tell, Heaven from Hell, Blue skies from pain,... How I wish,how I wish you were here."
    Wish You Were Here-Pink Floyd-1975

    J 1 Reply Last reply
    0
    • M Mazdak

      I want to type cast the text in text box to integer? Another guestion is that how to set text box tht the user can only type numbers into it? Mazy "So,so you think you can tell, Heaven from Hell, Blue skies from pain,... How I wish,how I wish you were here."
      Wish You Were Here-Pink Floyd-1975

      J Offline
      J Offline
      James T Johnson
      wrote on last edited by
      #2

      Mazdak wrote: I want to type cast the text in text box to integer? Int32.Parse(myString); if it throws an exception the string wasn't an integer :) Mazdak wrote: Another guestion is that how to set text box tht the user can only type numbers into it? Quick solution is to look for and use the masked edit C# control here on CP; secondary solution is to take the code it uses (the Key* events) and handle those the same way. James Sonork ID: 100.11138 - Hasaki "Smile your little smile, take some tea with me awhile. And every day we'll turn another page. Behind our glass we'll sit and look at our ever-open book, One brown mouse sitting in a cage." "One Brown Mouse" from Heavy Horses, Jethro Tull 1978

      M 1 Reply Last reply
      0
      • J James T Johnson

        Mazdak wrote: I want to type cast the text in text box to integer? Int32.Parse(myString); if it throws an exception the string wasn't an integer :) Mazdak wrote: Another guestion is that how to set text box tht the user can only type numbers into it? Quick solution is to look for and use the masked edit C# control here on CP; secondary solution is to take the code it uses (the Key* events) and handle those the same way. James Sonork ID: 100.11138 - Hasaki "Smile your little smile, take some tea with me awhile. And every day we'll turn another page. Behind our glass we'll sit and look at our ever-open book, One brown mouse sitting in a cage." "One Brown Mouse" from Heavy Horses, Jethro Tull 1978

        M Offline
        M Offline
        Mazdak
        wrote on last edited by
        #3

        Thank you friend :) Mazy "So,so you think you can tell, Heaven from Hell, Blue skies from pain,... How I wish,how I wish you were here."
        Wish You Were Here-Pink Floyd-1975

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups