Automatic Lock

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • werks
    New Member
    • Dec 2007
    • 218

    Automatic Lock

    Hi there programmers does does anyone know how to lock the screen? i mean when you click the Lock Button everything in the desktop will be LOCK unless you input the correct password to unlock it..pls help..

    Thanks in advance


    Better Than Yesterday ^^
  • daniel aristidou
    Contributor
    • Aug 2007
    • 494

    #2
    Originally posted by werks
    Hi there programmers does does anyone know how to lock the screen? i mean when you click the Lock Button everything in the desktop will be LOCK unless you input the correct password to unlock it..pls help..

    Thanks in advance


    Better Than Yesterday ^^
    Well im not sure how effective the method i suggest will be.......
    //Think it may be overidable using Ctrl+Alt+Del
    This might me avoided(maybe) By adding keypress events....//

    Make a form..
    SEt on top = True (i think this is nnot available in vb6)
    Make it without border
    Add a picture frame
    Set its position to x= 0 y =O
    On click enter code to
    CApture the screen.....
    Paste in picture box
    Make form modal
    Maximize the form.....

    Then add textbox tothe form....(on top of picture)
    Use this for password ....

    Comment

    • werks
      New Member
      • Dec 2007
      • 218

      #3
      Hi tnx for the reply. I want my system to lock everything even the START Program. the user could'nt also use the ALT+TAB.

      Comment

      • daniel aristidou
        Contributor
        • Aug 2007
        • 494

        #4
        Originally posted by werks
        Hi tnx for the reply. I want my system to lock everything even the START Program. the user could'nt also use the ALT+TAB.
        By startprograsm u mean the menu bar?
        It locks this as well . thinkk

        Comment

        • daniel aristidou
          Contributor
          • Aug 2007
          • 494

          #5
          Originally posted by daniel aristidou
          By startprograsm u mean the menu bar?
          It locks this as well . thinkk
          Try add ing a the keydown events or keypress
          When Alt + tab...... me.show modally
          When ctrl+ Alt + del me. show modally

          Comment

          • werks
            New Member
            • Dec 2007
            • 218

            #6
            tnx.. i'll try this later


            Better Than Yesterday ^^

            Comment

            • werks
              New Member
              • Dec 2007
              • 218

              #7
              Automatic Lock

              Hello does anyone know how to lock the system within a specified time? Like a screensaver..

              Actually i want my system to automatically lock if it is unused for about 15 minutes..tnx in advanced


              Better Than Yesterday ^^

              Comment

              • Wagz
                New Member
                • Feb 2008
                • 11

                #8
                You can use the Shell() function to run windows commands, so if you wanted to lock the computer you could try a command like

                Code:
                        Shell("rundll32.exe user32.dll, LockWorkStation")
                Wagz

                Comment

                • Killer42
                  Recognized Expert Expert
                  • Oct 2006
                  • 8429

                  #9
                  Originally posted by werks
                  Hello does anyone know how to lock the system within a specified time? Like a screensaver..

                  Actually i want my system to automatically lock if it is unused for about 15 minutes..tnx in advanced
                  That would depend on what you mean by "the system". If you mean your application, then you just use a timer in your program and reset something each time the user does anything.

                  If you mean "the system" as in the entire Windows session, just turn on your screensaver.

                  Comment

                  • debasisdas
                    Recognized Expert Expert
                    • Dec 2006
                    • 8119

                    #10
                    Originally posted by werks
                    Actually i want my system to automatically lock if it is unused for about 15 minutes........ ....
                    Why are you trying to re-invent the wheel .

                    Comment

                    • Ali Rizwan
                      Banned
                      Contributor
                      • Aug 2007
                      • 931

                      #11
                      Originally posted by werks
                      Hello does anyone know how to lock the system within a specified time? Like a screensaver..

                      Actually i want my system to automatically lock if it is unused for about 15 minutes..tnx in advanced


                      Better Than Yesterday ^^
                      I have made a programe in vb6 which switches the computer to login screen after a specific time or locks the computer.
                      And another which locks your whole computer screen.
                      Which of them you need tell me i ll send you that code or the whole programe.

                      Regards
                      >> ALI <<

                      Comment

                      • werks
                        New Member
                        • Dec 2007
                        • 218

                        #12
                        Originally posted by Wagz
                        You can use the Shell() function to run windows commands, so if you wanted to lock the computer you could try a command like

                        Code:
                                Shell("rundll32.exe user32.dll, LockWorkStation")
                        Wagz

                        thanks for the code..and it works..

                        Comment

                        • werks
                          New Member
                          • Dec 2007
                          • 218

                          #13
                          Thank you for the reply.. I'll be locking the whole computer screen and the user will return to the login screen of the computer..

                          Now my another problem is that how can i locked it if it is unused in a specified time ^^

                          Tnanks

                          Comment

                          • chandru8
                            New Member
                            • Sep 2007
                            • 145

                            #14
                            can you please post that code

                            Comment

                            • QVeen72
                              Recognized Expert Top Contributor
                              • Oct 2006
                              • 1445

                              #15
                              Hi,

                              Place a Timer on the Form..Enable it and Set Interval to 1000
                              Decalre a FormLevel variable say TempIdle As Integer

                              Make TempIdle = 0 In MouseMove and KeyPress Events of the Form.

                              In Timer1_Timer Event :
                              [code=vb]
                              TempIdle = TempIdle +1
                              If TempIdle>= 300 Then ' 5 mins
                              TempIdle = 0
                              Timer1.Enabled = False
                              ' / Write code to Lock the system..
                              End If
                              [/code]

                              And In Form_Activate event:
                              Timer1.Enabled = True
                              'This is for Tracking time again after Re-logging..

                              Regards
                              Veena

                              Comment

                              Working...