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. C# program to block user input(both mouse and keyboard) until a specific keyword(password) is entered

C# program to block user input(both mouse and keyboard) until a specific keyword(password) is entered

Scheduled Pinned Locked Moved C#
csharptutorialquestion
7 Posts 6 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.
  • A Offline
    A Offline
    ayandelhi
    wrote on last edited by
    #1

    HI!! i was thinking abt such a program which can block the inputs from keyboard n mouse until i enter the password... is such a program possible or m just thinking haywire... plz guide me... and one more thing can i control the flow of data from a USB Drive. I mean no data should move automatically (viruses) from USB to PC and vice-versa. if user initiates a copy/move operation, the data can move... Can i???

    Y C A 3 Replies Last reply
    0
    • A ayandelhi

      HI!! i was thinking abt such a program which can block the inputs from keyboard n mouse until i enter the password... is such a program possible or m just thinking haywire... plz guide me... and one more thing can i control the flow of data from a USB Drive. I mean no data should move automatically (viruses) from USB to PC and vice-versa. if user initiates a copy/move operation, the data can move... Can i???

      Y Offline
      Y Offline
      Yusuf
      wrote on last edited by
      #2

      ayandelhi wrote:

      block the inputs from keyboard n mouse until i enter the password.

      and how are you going to enter the password? :omg: :wtf:

      ayandelhi wrote:

      I mean no data should move automatically

      You mean no illegal data immigrants ;P :-O

      Yusuf May I help you?

      R A 2 Replies Last reply
      0
      • Y Yusuf

        ayandelhi wrote:

        block the inputs from keyboard n mouse until i enter the password.

        and how are you going to enter the password? :omg: :wtf:

        ayandelhi wrote:

        I mean no data should move automatically

        You mean no illegal data immigrants ;P :-O

        Yusuf May I help you?

        R Offline
        R Offline
        riced
        wrote on last edited by
        #3

        Reminds me of the POST message "No keyboard detected. Press F1 to continue." :laugh:

        Regards David R --------------------------------------------------------------- "Every program eventually becomes rococo, and then rubble." - Alan Perlis The only valid measurement of code quality: WTFs/minute.

        1 Reply Last reply
        0
        • A ayandelhi

          HI!! i was thinking abt such a program which can block the inputs from keyboard n mouse until i enter the password... is such a program possible or m just thinking haywire... plz guide me... and one more thing can i control the flow of data from a USB Drive. I mean no data should move automatically (viruses) from USB to PC and vice-versa. if user initiates a copy/move operation, the data can move... Can i???

          C Offline
          C Offline
          Chris Trelawny Ross
          wrote on last edited by
          #4

          Hmm - takes no programming: Ctrl+Alt+Del, then hit Enter. I think it's called the Windows logon screen. :-D

          K 1 Reply Last reply
          0
          • Y Yusuf

            ayandelhi wrote:

            block the inputs from keyboard n mouse until i enter the password.

            and how are you going to enter the password? :omg: :wtf:

            ayandelhi wrote:

            I mean no data should move automatically

            You mean no illegal data immigrants ;P :-O

            Yusuf May I help you?

            A Offline
            A Offline
            ayandelhi
            wrote on last edited by
            #5

            that is wat i was thinking.. but what if the application in pace of blocking the input simply does nothing on the inputs until a specific combination like ctrl+p is pressed to enter password... but the mouse still remains inactive.. no other key should be able to work.. like alt+tab which is used to change minimized windows should not be able to work... win button should be deactivated... and many more like it... so tell me... and the USB stuff... i want to to monitor the data which moves without user involvement... viruses just copy them self from usb to pc and fro.. this is very annoying...

            1 Reply Last reply
            0
            • A ayandelhi

              HI!! i was thinking abt such a program which can block the inputs from keyboard n mouse until i enter the password... is such a program possible or m just thinking haywire... plz guide me... and one more thing can i control the flow of data from a USB Drive. I mean no data should move automatically (viruses) from USB to PC and vice-versa. if user initiates a copy/move operation, the data can move... Can i???

              A Offline
              A Offline
              aj esler
              wrote on last edited by
              #6

              Should be pretty easy with some sort of low level hook that blocks input. If the password is x chars long, just keep the last x chars in memory but block them from going any further. If the last x chars match the password, allow any subsequent mouse or keyboard input to go through. This[^] article should provide a good starting point. The faq also explains how to block keyboard input.

              1 Reply Last reply
              0
              • C Chris Trelawny Ross

                Hmm - takes no programming: Ctrl+Alt+Del, then hit Enter. I think it's called the Windows logon screen. :-D

                K Offline
                K Offline
                Kim Togo
                wrote on last edited by
                #7

                Absolute the best solution.

                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