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. How do i?

How do i?

Scheduled Pinned Locked Moved C#
questionhelp
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
    Silvyster
    wrote on last edited by
    #1

    I'm creating a simple calculator.. so my calculator has only a textbox, it doesnt have any buttons so the user communicates with the calculator using the keyboard... so what i did is to enable the preview key down of the form and on the event of the key down, the computer is able to get the values entered from the keyboard. The problem with key down is that it only works if it has focus on the control or the form... but what i want is that even though the focus is not on the form or lets say the focus is on another application, how do i get my program to still get the keyboard values entered by the user?

    P 1 Reply Last reply
    0
    • S Silvyster

      I'm creating a simple calculator.. so my calculator has only a textbox, it doesnt have any buttons so the user communicates with the calculator using the keyboard... so what i did is to enable the preview key down of the form and on the event of the key down, the computer is able to get the values entered from the keyboard. The problem with key down is that it only works if it has focus on the control or the form... but what i want is that even though the focus is not on the form or lets say the focus is on another application, how do i get my program to still get the keyboard values entered by the user?

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

      So if I'm typing in Notepad it would also be entered in your calculator? http://mail.gnome.org/archives/gtk-app-devel-list/2006-October/msg00255.html[^] http://forums.msdn.microsoft.com/en-US/netfxbcl/thread/e78c47c9-5747-4de7-8326-1604e722bd31/[^]

      S 1 Reply Last reply
      0
      • P PIEBALDconsult

        So if I'm typing in Notepad it would also be entered in your calculator? http://mail.gnome.org/archives/gtk-app-devel-list/2006-October/msg00255.html[^] http://forums.msdn.microsoft.com/en-US/netfxbcl/thread/e78c47c9-5747-4de7-8326-1604e722bd31/[^]

        S Offline
        S Offline
        Silvyster
        wrote on last edited by
        #3

        yeah cause you know i'm doing like a computation while looking at the values at the other application and dont like doing the short cut keys using alt+tab or keep on clicking the calculator just to enter values. specially if its in full screen mode.

        P 1 Reply Last reply
        0
        • S Silvyster

          yeah cause you know i'm doing like a computation while looking at the values at the other application and dont like doing the short cut keys using alt+tab or keep on clicking the calculator just to enter values. specially if its in full screen mode.

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

          You have me imagining an applet that's always minimized and displays the calculation its caption.

          J 1 Reply Last reply
          0
          • P PIEBALDconsult

            You have me imagining an applet that's always minimized and displays the calculation its caption.

            J Offline
            J Offline
            JoeRip
            wrote on last edited by
            #5

            Interesting, because I'm envisioning a keylogger.

            T 1 Reply Last reply
            0
            • J JoeRip

              Interesting, because I'm envisioning a keylogger.

              T Offline
              T Offline
              TheFM234
              wrote on last edited by
              #6

              I thought that at first, but it seems like a legit concept. I don't like flipping between a calculator and windows all the time.

              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