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. Lock the Computer

Lock the Computer

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

    Hi all, I am trying to make a program that locks the computer every 1 hour, and display a window to the user, this should have a question , and textbox to answer the question. I don't how to do this exactly, i tried to make a code to change the password of the user to be the answer of some question and the password hint to be the question, but i failed. I don't know if this method works or not, if you can help me to do this, then i am grateful However, if you know any other techniques to do this, please suggest

    P L 2 Replies Last reply
    0
    • S Sabry1905

      Hi all, I am trying to make a program that locks the computer every 1 hour, and display a window to the user, this should have a question , and textbox to answer the question. I don't how to do this exactly, i tried to make a code to change the password of the user to be the answer of some question and the password hint to be the question, but i failed. I don't know if this method works or not, if you can help me to do this, then i am grateful However, if you know any other techniques to do this, please suggest

      P Offline
      P Offline
      Pete OHanlon
      wrote on last edited by
      #2

      You're trying to do what?!??? Seriously, why are you trying to do this?

      This space for rent

      L 1 Reply Last reply
      0
      • S Sabry1905

        Hi all, I am trying to make a program that locks the computer every 1 hour, and display a window to the user, this should have a question , and textbox to answer the question. I don't how to do this exactly, i tried to make a code to change the password of the user to be the answer of some question and the password hint to be the question, but i failed. I don't know if this method works or not, if you can help me to do this, then i am grateful However, if you know any other techniques to do this, please suggest

        L Offline
        L Offline
        Lost User
        wrote on last edited by
        #3

        You create your own desktop[^], and set it to the foreground. Next you run your GUI in that Desktop, and close the desktop again if the requirements are met.

        Bastard Programmer from Hell :suss: If you can't read my code, try converting it here[^][](X-Clacks-Overhead: GNU Terry Pratchett)

        S 1 Reply Last reply
        0
        • P Pete OHanlon

          You're trying to do what?!??? Seriously, why are you trying to do this?

          This space for rent

          L Offline
          L Offline
          Lost User
          wrote on last edited by
          #4

          I think you know the answer to your question. ;)

          P S 2 Replies Last reply
          0
          • L Lost User

            I think you know the answer to your question. ;)

            P Offline
            P Offline
            Pete OHanlon
            wrote on last edited by
            #5

            It has to be asked. There's a one in 10 billion chance it might be legit.

            This space for rent

            P 1 Reply Last reply
            0
            • P Pete OHanlon

              It has to be asked. There's a one in 10 billion chance it might be legit.

              This space for rent

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

              Yep, and the population of the planet is somewhat less than ten billion.... Cheers, Peter

              Software rusts. Simon Stephenson, ca 1994. So does this signature. me, 2012

              1 Reply Last reply
              0
              • L Lost User

                I think you know the answer to your question. ;)

                S Offline
                S Offline
                Sabry1905
                wrote on last edited by
                #7

                I don't

                L 1 Reply Last reply
                0
                • S Sabry1905

                  I don't

                  L Offline
                  L Offline
                  Lost User
                  wrote on last edited by
                  #8

                  Was your hour up when you were writing that post?

                  Bastard Programmer from Hell :suss: If you can't read my code, try converting it here[^][](X-Clacks-Overhead: GNU Terry Pratchett)

                  S 1 Reply Last reply
                  0
                  • L Lost User

                    Was your hour up when you were writing that post?

                    Bastard Programmer from Hell :suss: If you can't read my code, try converting it here[^][](X-Clacks-Overhead: GNU Terry Pratchett)

                    S Offline
                    S Offline
                    Sabry1905
                    wrote on last edited by
                    #9

                    What is wrong ?

                    1 Reply Last reply
                    0
                    • L Lost User

                      You create your own desktop[^], and set it to the foreground. Next you run your GUI in that Desktop, and close the desktop again if the requirements are met.

                      Bastard Programmer from Hell :suss: If you can't read my code, try converting it here[^][](X-Clacks-Overhead: GNU Terry Pratchett)

                      S Offline
                      S Offline
                      Sabry1905
                      wrote on last edited by
                      #10

                      I am doing this in my own computer, and i will make a copy of this application on my children's PC, the purpose of this software is to encourage them to gain knowledge. The main problem, is that i don't know how to make my program on top of everything , and make the user unable to get rid of it , until solving the question

                      L 1 Reply Last reply
                      0
                      • S Sabry1905

                        I am doing this in my own computer, and i will make a copy of this application on my children's PC, the purpose of this software is to encourage them to gain knowledge. The main problem, is that i don't know how to make my program on top of everything , and make the user unable to get rid of it , until solving the question

                        L Offline
                        L Offline
                        Lost User
                        wrote on last edited by
                        #11

                        Your program can't be on top of everything, unless it is running as a screensaver. Other applications will fight for the right of being the topmost. The login-screen and the desktop are "desktop" objects, capable of showing applications. You'd need to create one (example here[^]) and then run your application in that new desktop. There's bound to be an article on CodeProject that shows "desktop switching", which would be a good place to start* No, not easy if you're new to .NET. --edit *) Found it; Desktop Switching[^]. Contains a desktop-class that hides the complicated stuff.

                        Bastard Programmer from Hell :suss: If you can't read my code, try converting it here[^][](X-Clacks-Overhead: GNU Terry Pratchett)

                        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