screen lock

my application will lock the screen until user enter the correct passw

Page 1 of 1

14 Replies - 15470 Views - Last Post: 25 January 2010 - 12:08 AM Rate Topic: -----

#1 jeary  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 2
  • Joined: 22-January 10

screen lock

Post icon  Posted 22 January 2010 - 02:37 AM

i want to make a program which lock the computer screen until user enter the correct Password
what will i have to make this application and how i can do this
Is This A Good Question/Topic? 0
  • +

#3 LeisureProgrammer  Icon User is offline

  • N00by VB.NET Developer
  • member icon

Reputation: 110
  • View blog
  • Posts: 588
  • Joined: 06-September 09

Re: screen lock

Posted 22 January 2010 - 04:16 AM

Here are my favorite ways of making the user feel annoyed/frustrated because my program won't let him do anything.

- First of all, decide whether you're going to make the computer beep or not, I suggest you make it beep thrice when they enter an incorrect password
- Cancel the form closing event so the user can't alt+f4 his way out
Warning: this will cause the user to not be able to "soft reboot/shutoff" his comp without entering the password.
 Private Sub Form1_Closing(ByVal sender As Object, ByVal e As System.ComponentModel.CancelEventArgs) Handles MyBase.Closing
		e.Cancel = True
End Sub


- Maximize the window me.windowstate = formwindowstate.maximized
- Make the form the top most window me.topmost = true
- Make sure the user doesn't minimize/resotre his way out:
'Put this in a timer tick event 
 If Me.WindowState <> FormWindowState.Maximized Then
			Me.WindowState = FormWindowState.Maximized
  End If



Oh, remember to disable ctrl+alt+delete, I don't remember how to do that ATM

Now you can add a textbox and button for the password.
TIP/Challenge: Try using the Microsoft Speech SDK to make the program constantly pressure the user to enter his/her password.

Oh, if you want to be really mean you could lock the user's mouse cursor in a little rectangle cage :P

------------------------------------------
EDIT: I am assuming that the OP is going to use this in a responsible way.

This post has been edited by LeisureProgrammer: 22 January 2010 - 06:23 PM

Was This Post Helpful? 1
  • +
  • -

#4 AMDKilla  Icon User is offline

  • D.I.C Head

Reputation: 6
  • View blog
  • Posts: 88
  • Joined: 30-December 09

Re: screen lock

Posted 22 January 2010 - 02:52 PM

View PostLeisureProgrammer, on 22 Jan, 2010 - 10:16 AM, said:

Here are my favorite ways of making the user feel annoyed/frustrated because my program won't let him do anything.

- First of all, decide whether you're going to make the computer beep or not, I suggest you make it beep thrice when they enter an incorrect password
- Cancel the form closing event so the user can't alt+f4 his way out
Warning: this will cause the user to not be able to "soft reboot/shutoff" his comp without entering the password.
 Private Sub Form1_Closing(ByVal sender As Object, ByVal e As System.ComponentModel.CancelEventArgs) Handles MyBase.Closing
		e.Cancel = True
End Sub


- Maximize the window me.windowstate = formwindowstate.maximized
- Make the form the top most window me.topmost = true
- Make sure the user doesn't minimize/resotre his way out:
'Put this in a timer tick event 
 If Me.WindowState <> FormWindowState.Maximized Then
			Me.WindowState = FormWindowState.Maximized
  End If



Oh, remember to disable ctrl+alt+delete, I don't remember how to do that ATM

Now you can add a textbox and button for the password.
TIP/Challenge: Try using the Microsoft Speech SDK to make the program constantly pressure the user to enter his/her password.

Oh, if you want to be really mean you could lock the user's mouse cursor in a little rectangle cage :P


Sounds to me more like a virus than a useful application :D

You could also include something to once in a while say that the password is wrong even if it is typed in correctly :D

This post has been edited by AMDKilla: 22 January 2010 - 02:52 PM

Was This Post Helpful? 0
  • +
  • -

#5 artifex nex  Icon User is offline

  • New D.I.C Head
  • member icon

Reputation: 1
  • View blog
  • Posts: 8
  • Joined: 01-November 09

Re: screen lock

Posted 22 January 2010 - 06:53 PM

I made something like this a while ago. I tried to get it to use a password but that didn't work to well. So it just searches for a file on a USB drive or a SD/MMC card. You can find it at my website here.

Quote

You could also include something to once in a while say that the password is wrong even if it is typed in correctly biggrin.gif


That's just cruel. I like it. :D

This post has been edited by artifex nex: 23 January 2010 - 01:52 AM

Was This Post Helpful? 1
  • +
  • -

#6 AMDKilla  Icon User is offline

  • D.I.C Head

Reputation: 6
  • View blog
  • Posts: 88
  • Joined: 30-December 09

Re: screen lock

Posted 22 January 2010 - 06:57 PM

View Postartifex nex, on 23 Jan, 2010 - 12:53 AM, said:

I made something like this a while ago. I tried to get it to use a password but that didn't work to well. So it just searches for a file on a USB drive or a SD/MMC card. You can find it here.

Quote

You could also include something to once in a while say that the password is wrong even if it is typed in correctly biggrin.gif


That's just cruel. I like it. :D


One installation of XP I had would forget the password after coming back from standby, I had to restart to gain access. I was putting in the password correctly, but after every standby, it would forget the password, really annoying :D
Was This Post Helpful? 0
  • +
  • -

#7 dawmail333  Icon User is offline

  • D.I.C Head
  • member icon

Reputation: 27
  • View blog
  • Posts: 174
  • Joined: 02-July 07

Re: screen lock

Posted 23 January 2010 - 03:43 AM

View PostAMDKilla, on 22 Jan, 2010 - 05:57 PM, said:

One installation of XP I had would forget the password after coming back from standby, I had to restart to gain access. I was putting in the password correctly, but after every standby, it would forget the password, really annoying :D


OT, but that wouldn't have been a laptop perchance?
Was This Post Helpful? 0
  • +
  • -

#8 Jack Eagles1  Icon User is offline

  • Pugnacious Penguin (inspired by no2pencil)
  • member icon

Reputation: 183
  • View blog
  • Posts: 1,152
  • Joined: 10-December 08

Re: screen lock

Posted 23 January 2010 - 09:54 AM

You could also disable TaskManager in the registry, and most of the options in the security dialog... Ofcourse the user can just pull out the power... But then you could put your program in startup... but then the user starts in safe mode... and then your app becomes useless...
Was This Post Helpful? 0
  • +
  • -

#9 LeisureProgrammer  Icon User is offline

  • N00by VB.NET Developer
  • member icon

Reputation: 110
  • View blog
  • Posts: 588
  • Joined: 06-September 09

Re: screen lock

Posted 23 January 2010 - 09:58 AM

Quote

You could also disable TaskManager in the registry, and most of the options in the security dialog... Ofcourse the user can just pull out the power... But then you could put your program in startup... but then the user starts in safe mode... and then your app becomes useless...


Careful there... talk like this could lead to this topic getting closed :(
Let's not give mods the false impression that we're talking about malware.

OP, why do you want to lock the screen, what are your intentions?

This post has been edited by LeisureProgrammer: 23 January 2010 - 10:16 AM

Was This Post Helpful? 0
  • +
  • -

#10 AMDKilla  Icon User is offline

  • D.I.C Head

Reputation: 6
  • View blog
  • Posts: 88
  • Joined: 30-December 09

Re: screen lock

Posted 23 January 2010 - 10:50 AM

View Postdawmail333, on 23 Jan, 2010 - 09:43 AM, said:

View PostAMDKilla, on 22 Jan, 2010 - 05:57 PM, said:

One installation of XP I had would forget the password after coming back from standby, I had to restart to gain access. I was putting in the password correctly, but after every standby, it would forget the password, really annoying :D


OT, but that wouldn't have been a laptop perchance?


Yea it was, I dont suppose you had the same problem? :D

View PostLeisureProgrammer, on 23 Jan, 2010 - 03:58 PM, said:

Quote

You could also disable TaskManager in the registry, and most of the options in the security dialog... Ofcourse the user can just pull out the power... But then you could put your program in startup... but then the user starts in safe mode... and then your app becomes useless...


Careful there... talk like this could lead to this topic getting closed :(
Let's not give mods the false impression that we're talking about malware.

OP, why do you want to lock the screen, what are your intentions?


I was looking for something similar a while ago, I was creating a custom interface for a gaming LAN, and didnt want to alter people's Windows installations, so they would run windows, and then my application would run on top, and log into a central server, which would then distribute updates, a bit like steam does, but a complete replacement frontend instead of just a shortcut app.
Was This Post Helpful? 0
  • +
  • -

#11 dawmail333  Icon User is offline

  • D.I.C Head
  • member icon

Reputation: 27
  • View blog
  • Posts: 174
  • Joined: 02-July 07

Re: screen lock

Posted 23 January 2010 - 03:28 PM

I remember a component on CodeProject had the capacity to block the screen (think UAC style). On XP there was no real way to get out of it, dunno about Vista & higher (LogonUI.exe works a bit differently in them, so you might be able to get to TaskManager). If you're interested:

http://www.codeproje...vb/vdialog.aspx

Once again, RESPONSIBLE use.

View PostAMDKilla, on 23 Jan, 2010 - 09:50 AM, said:

View Postdawmail333, on 23 Jan, 2010 - 09:43 AM, said:

View PostAMDKilla, on 22 Jan, 2010 - 05:57 PM, said:

One installation of XP I had would forget the password after coming back from standby, I had to restart to gain access. I was putting in the password correctly, but after every standby, it would forget the password, really annoying :D


OT, but that wouldn't have been a laptop perchance?


Haha, this should finish my little OT streak, but whenever that happens, check your numlock. If it's turned itself on, it could be messing up your otherwise correct password. :ph34r:
Was This Post Helpful? 0
  • +
  • -

#12 AMDKilla  Icon User is offline

  • D.I.C Head

Reputation: 6
  • View blog
  • Posts: 88
  • Joined: 30-December 09

Re: screen lock

Posted 23 January 2010 - 03:42 PM

View Postdawmail333, on 23 Jan, 2010 - 09:28 PM, said:

Haha, this should finish my little OT streak, but whenever that happens, check your numlock. If it's turned itself on, it could be messing up your otherwise correct password. :ph34r:


Well the numlock was set to always off in BIOS, and I did check things like that and caps lock.... nothing, all turned off :D
Was This Post Helpful? 0
  • +
  • -

#13 dawmail333  Icon User is offline

  • D.I.C Head
  • member icon

Reputation: 27
  • View blog
  • Posts: 174
  • Joined: 02-July 07

Re: screen lock

Posted 23 January 2010 - 03:43 PM

Must have been :ph34r: then. Running around your computer with electromagnets. :P
Was This Post Helpful? 0
  • +
  • -

#14 AMDKilla  Icon User is offline

  • D.I.C Head

Reputation: 6
  • View blog
  • Posts: 88
  • Joined: 30-December 09

Re: screen lock

Posted 23 January 2010 - 04:05 PM

View Postdawmail333, on 23 Jan, 2010 - 09:43 PM, said:

Must have been :ph34r: then. Running around your computer with electromagnets. :P


Na, I think it was the Biometrics software loaded onto there. Given that the software was written by HP, I half expected it to be the problem :D

Come to think of it, it wouldent log in with the fingerprint either, it never showed the parts on the logon screen for it after standby.
Was This Post Helpful? 0
  • +
  • -

#15 jeary  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 2
  • Joined: 22-January 10

Re: screen lock

Posted 24 January 2010 - 02:31 AM

how to restrict mouse to the form and how to disable all other screen rather then our form 

Was This Post Helpful? 0
  • +
  • -

#16 artifex nex  Icon User is offline

  • New D.I.C Head
  • member icon

Reputation: 1
  • View blog
  • Posts: 8
  • Joined: 01-November 09

Re: screen lock

Posted 25 January 2010 - 12:08 AM

View Postjeary, on 24 Jan, 2010 - 01:31 AM, said:

how to restrict mouse to the form and how to disable all other screen rather then our form 

The BlockInput Function will disable the keyboard and mouse. There might be a way for it to only allow input to your form. Or you could always use Windows + L. Kinda fail proof. ;)

Also do you mind not putting your comments in [code] tags.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1