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. Progammatically pressing underscore,$,% etc keys

Progammatically pressing underscore,$,% etc keys

Scheduled Pinned Locked Moved C#
helptutorial
6 Posts 4 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.
  • S Offline
    S Offline
    Sandeep Kalra
    wrote on last edited by
    #1

    ************Programming Challenge********************** Hi All Again I have spent more than five hours but still fighting. I just want to type underscore in my windows textbox.I am able to type characters, Hit enter key etc etc but do not yet found how to print underscore and other special characters like @,$,%,^ I have tried following code .Discovered new things but still trying to find the solution SendKeys.SendWait(Keys.Decimal.ToString()); SendKeys.SendWait(Keys.S.ToString()); SendKeys.SendWait(Keys.A.ToString()); SendKeys.SendWait(Keys.N.ToString()); SendKeys.SendWait(Keys.D.ToString()); SendKeys.SendWait(Keys.E.ToString()); SendKeys.SendWait(Keys.Oem1.ToString()); SendKeys.SendWait(Keys.Oem102.ToString()); SendKeys.SendWait(Keys.Oem2.ToString()); SendKeys.SendWait(Keys.Oem3.ToString()); SendKeys.SendWait(Keys.Oem4.ToString()); SendKeys.SendWait(Keys.Oem5.ToString()); SendKeys.SendWait(Keys.Oem6.ToString()); // with this type of code getting Oem6 in // textbox but i wanted 6. SendKeys.SendWait(Keys.Oem7.ToString()); SendKeys.SendWait(Keys.Oem8.ToString()); SendKeys.SendWait(Keys.OemClear.ToString()); SendKeys.SendWait(Keys.OemBackslash.ToString()); SendKeys.SendWait(Keys.OemCloseBrackets.ToString()); SendKeys.SendWait(Keys.Oemcomma.ToString()); SendKeys.SendWait(Keys.OemMinus.ToString()); SendKeys.SendWait(Keys.OemOpenBrackets.ToString()); //with this code getting OemOpenBrackets in textbox but desired was (. SendKeys.SendWait(Keys.OemPeriod.ToString()); SendKeys.SendWait(Keys.OemPipe.ToString()); SendKeys.SendWait(Keys.Oemplus.ToString()); SendKeys.SendWait(Keys.OemQuestion.ToString()); SendKeys.SendWait(Keys.OemQuotes.ToString()); SendKeys.SendWait(Keys.OemSemicolon.ToString()); SendKeys.SendWait(Keys.Oemtilde.ToString()); SendKeys.SendWait("{OemSemicolon}"); //givin error SendKeys.SendWait(Keys.KeyCode== 106); //giving error SendKeys.SendWait(Keys.E.ToString());

    S L P 3 Replies Last reply
    0
    • S Sandeep Kalra

      ************Programming Challenge********************** Hi All Again I have spent more than five hours but still fighting. I just want to type underscore in my windows textbox.I am able to type characters, Hit enter key etc etc but do not yet found how to print underscore and other special characters like @,$,%,^ I have tried following code .Discovered new things but still trying to find the solution SendKeys.SendWait(Keys.Decimal.ToString()); SendKeys.SendWait(Keys.S.ToString()); SendKeys.SendWait(Keys.A.ToString()); SendKeys.SendWait(Keys.N.ToString()); SendKeys.SendWait(Keys.D.ToString()); SendKeys.SendWait(Keys.E.ToString()); SendKeys.SendWait(Keys.Oem1.ToString()); SendKeys.SendWait(Keys.Oem102.ToString()); SendKeys.SendWait(Keys.Oem2.ToString()); SendKeys.SendWait(Keys.Oem3.ToString()); SendKeys.SendWait(Keys.Oem4.ToString()); SendKeys.SendWait(Keys.Oem5.ToString()); SendKeys.SendWait(Keys.Oem6.ToString()); // with this type of code getting Oem6 in // textbox but i wanted 6. SendKeys.SendWait(Keys.Oem7.ToString()); SendKeys.SendWait(Keys.Oem8.ToString()); SendKeys.SendWait(Keys.OemClear.ToString()); SendKeys.SendWait(Keys.OemBackslash.ToString()); SendKeys.SendWait(Keys.OemCloseBrackets.ToString()); SendKeys.SendWait(Keys.Oemcomma.ToString()); SendKeys.SendWait(Keys.OemMinus.ToString()); SendKeys.SendWait(Keys.OemOpenBrackets.ToString()); //with this code getting OemOpenBrackets in textbox but desired was (. SendKeys.SendWait(Keys.OemPeriod.ToString()); SendKeys.SendWait(Keys.OemPipe.ToString()); SendKeys.SendWait(Keys.Oemplus.ToString()); SendKeys.SendWait(Keys.OemQuestion.ToString()); SendKeys.SendWait(Keys.OemQuotes.ToString()); SendKeys.SendWait(Keys.OemSemicolon.ToString()); SendKeys.SendWait(Keys.Oemtilde.ToString()); SendKeys.SendWait("{OemSemicolon}"); //givin error SendKeys.SendWait(Keys.KeyCode== 106); //giving error SendKeys.SendWait(Keys.E.ToString());

      S Offline
      S Offline
      Sandeep Kalra
      wrote on last edited by
      #2

      Hi All Finally got it on below link http://msdn.microsoft.com/en-us/library/8c6yea83(VS.85).aspx The correct way is SendKeys.SendWait("{+}"); //for typing plus SendKeys.SendWait("{_}"); //for typing underscore For this spent more than five hours ... great THE SK I am the ONE

      1 Reply Last reply
      0
      • S Sandeep Kalra

        ************Programming Challenge********************** Hi All Again I have spent more than five hours but still fighting. I just want to type underscore in my windows textbox.I am able to type characters, Hit enter key etc etc but do not yet found how to print underscore and other special characters like @,$,%,^ I have tried following code .Discovered new things but still trying to find the solution SendKeys.SendWait(Keys.Decimal.ToString()); SendKeys.SendWait(Keys.S.ToString()); SendKeys.SendWait(Keys.A.ToString()); SendKeys.SendWait(Keys.N.ToString()); SendKeys.SendWait(Keys.D.ToString()); SendKeys.SendWait(Keys.E.ToString()); SendKeys.SendWait(Keys.Oem1.ToString()); SendKeys.SendWait(Keys.Oem102.ToString()); SendKeys.SendWait(Keys.Oem2.ToString()); SendKeys.SendWait(Keys.Oem3.ToString()); SendKeys.SendWait(Keys.Oem4.ToString()); SendKeys.SendWait(Keys.Oem5.ToString()); SendKeys.SendWait(Keys.Oem6.ToString()); // with this type of code getting Oem6 in // textbox but i wanted 6. SendKeys.SendWait(Keys.Oem7.ToString()); SendKeys.SendWait(Keys.Oem8.ToString()); SendKeys.SendWait(Keys.OemClear.ToString()); SendKeys.SendWait(Keys.OemBackslash.ToString()); SendKeys.SendWait(Keys.OemCloseBrackets.ToString()); SendKeys.SendWait(Keys.Oemcomma.ToString()); SendKeys.SendWait(Keys.OemMinus.ToString()); SendKeys.SendWait(Keys.OemOpenBrackets.ToString()); //with this code getting OemOpenBrackets in textbox but desired was (. SendKeys.SendWait(Keys.OemPeriod.ToString()); SendKeys.SendWait(Keys.OemPipe.ToString()); SendKeys.SendWait(Keys.Oemplus.ToString()); SendKeys.SendWait(Keys.OemQuestion.ToString()); SendKeys.SendWait(Keys.OemQuotes.ToString()); SendKeys.SendWait(Keys.OemSemicolon.ToString()); SendKeys.SendWait(Keys.Oemtilde.ToString()); SendKeys.SendWait("{OemSemicolon}"); //givin error SendKeys.SendWait(Keys.KeyCode== 106); //giving error SendKeys.SendWait(Keys.E.ToString());

        L Offline
        L Offline
        led mike
        wrote on last edited by
        #3

        Sandeep Kalra wrote:

        I just want to type underscore in my windows textbox.

        Try using Fire_Fox. See it works I just_did_it. Oh wow, I did it again _ and again! Only took me like 5_seconds!

        led mike

        S J 2 Replies Last reply
        0
        • L led mike

          Sandeep Kalra wrote:

          I just want to type underscore in my windows textbox.

          Try using Fire_Fox. See it works I just_did_it. Oh wow, I did it again _ and again! Only took me like 5_seconds!

          led mike

          S Offline
          S Offline
          Sandeep Kalra
          wrote on last edited by
          #4

          Hey led mike U have used Fire_Fox.I think u should use Fire_Lion now.It will take 50 years to you :laugh:

          1 Reply Last reply
          0
          • L led mike

            Sandeep Kalra wrote:

            I just want to type underscore in my windows textbox.

            Try using Fire_Fox. See it works I just_did_it. Oh wow, I did it again _ and again! Only took me like 5_seconds!

            led mike

            J Offline
            J Offline
            Jason Lepack LeppyR64
            wrote on last edited by
            #5

            Programattically... Using C#...

            1 Reply Last reply
            0
            • S Sandeep Kalra

              ************Programming Challenge********************** Hi All Again I have spent more than five hours but still fighting. I just want to type underscore in my windows textbox.I am able to type characters, Hit enter key etc etc but do not yet found how to print underscore and other special characters like @,$,%,^ I have tried following code .Discovered new things but still trying to find the solution SendKeys.SendWait(Keys.Decimal.ToString()); SendKeys.SendWait(Keys.S.ToString()); SendKeys.SendWait(Keys.A.ToString()); SendKeys.SendWait(Keys.N.ToString()); SendKeys.SendWait(Keys.D.ToString()); SendKeys.SendWait(Keys.E.ToString()); SendKeys.SendWait(Keys.Oem1.ToString()); SendKeys.SendWait(Keys.Oem102.ToString()); SendKeys.SendWait(Keys.Oem2.ToString()); SendKeys.SendWait(Keys.Oem3.ToString()); SendKeys.SendWait(Keys.Oem4.ToString()); SendKeys.SendWait(Keys.Oem5.ToString()); SendKeys.SendWait(Keys.Oem6.ToString()); // with this type of code getting Oem6 in // textbox but i wanted 6. SendKeys.SendWait(Keys.Oem7.ToString()); SendKeys.SendWait(Keys.Oem8.ToString()); SendKeys.SendWait(Keys.OemClear.ToString()); SendKeys.SendWait(Keys.OemBackslash.ToString()); SendKeys.SendWait(Keys.OemCloseBrackets.ToString()); SendKeys.SendWait(Keys.Oemcomma.ToString()); SendKeys.SendWait(Keys.OemMinus.ToString()); SendKeys.SendWait(Keys.OemOpenBrackets.ToString()); //with this code getting OemOpenBrackets in textbox but desired was (. SendKeys.SendWait(Keys.OemPeriod.ToString()); SendKeys.SendWait(Keys.OemPipe.ToString()); SendKeys.SendWait(Keys.Oemplus.ToString()); SendKeys.SendWait(Keys.OemQuestion.ToString()); SendKeys.SendWait(Keys.OemQuotes.ToString()); SendKeys.SendWait(Keys.OemSemicolon.ToString()); SendKeys.SendWait(Keys.Oemtilde.ToString()); SendKeys.SendWait("{OemSemicolon}"); //givin error SendKeys.SendWait(Keys.KeyCode== 106); //giving error SendKeys.SendWait(Keys.E.ToString());

              P Offline
              P Offline
              PIEBALDconsult
              wrote on last edited by
              #6

              You can't just append the character to the text? :confused:

              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