473,326 Members | 2,680 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 software developers and data experts.

Automatic Lock

werks
220 100+
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 ^^
Jan 29 '08 #1
26 4396
daniel aristidou
491 256MB
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 ....
Jan 29 '08 #2
werks
220 100+
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.
Jan 29 '08 #3
daniel aristidou
491 256MB
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
Jan 29 '08 #4
daniel aristidou
491 256MB
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
Jan 29 '08 #5
werks
220 100+
tnx.. i'll try this later


Better Than Yesterday ^^
Jan 29 '08 #6
werks
220 100+
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 ^^
Feb 5 '08 #7
Wagz
11
You can use the Shell() function to run windows commands, so if you wanted to lock the computer you could try a command like

Expand|Select|Wrap|Line Numbers
  1.         Shell("rundll32.exe user32.dll, LockWorkStation")
  2.  
Wagz
Feb 6 '08 #8
Killer42
8,435 Expert 8TB
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.
Feb 6 '08 #9
debasisdas
8,127 Expert 4TB
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 .
Feb 6 '08 #10
Ali Rizwan
925 512MB
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 <<
Feb 6 '08 #11
werks
220 100+
You can use the Shell() function to run windows commands, so if you wanted to lock the computer you could try a command like

Expand|Select|Wrap|Line Numbers
  1.         Shell("rundll32.exe user32.dll, LockWorkStation")
  2.  
Wagz

thanks for the code..and it works..
Feb 6 '08 #12
werks
220 100+
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
Feb 6 '08 #13
chandru8
145 100+
can you please post that code
Feb 6 '08 #14
QVeen72
1,445 Expert 1GB
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 :
Expand|Select|Wrap|Line Numbers
  1. TempIdle = TempIdle +1
  2. If TempIdle>= 300 Then ' 5 mins
  3.   TempIdle = 0 
  4.   Timer1.Enabled = False
  5.   ' / Write code to Lock the system..
  6. End  If
  7.  
And In Form_Activate event:
Timer1.Enabled = True
'This is for Tracking time again after Re-logging..

Regards
Veena
Feb 6 '08 #15
chandru8
145 100+
Thanks for your reply i need the code to lock the system
thanks ya..,
Feb 6 '08 #16
QVeen72
1,445 Expert 1GB
Hi Chandru,

Read this complete thread, you will get it in second post..

Regards
Veena
Feb 6 '08 #17
Ali Rizwan
925 512MB
Hi all,

Here is my Auto Locker.

It hides itself from task manager's processes.
Auto Startup function.

If any errors or problems contact me.

Regards

>> ALI <<
Attached Files
File Type: zip Sys Lock.zip (51.3 KB, 419 views)
Feb 6 '08 #18
werks
220 100+
Hi all,

Here is my Auto Locker.

It hides itself from task manager's processes.
Auto Startup function.

If any errors or problems contact me.

Regards

>> ALI <<
Errors occurred


Runtime Error '380'

Invalid Property Value


Is there something wrong?
Feb 7 '08 #19
werks
220 100+
Thank you for helping me programmers..

Better Than Yesterday ^^
Feb 7 '08 #20
Ali Rizwan
925 512MB
Thank you for helping me programmers..

Better Than Yesterday ^^
OK i have found the error i ll fix the bug and upload again.

Regards
>> ALI <<
Feb 7 '08 #21
Ali Rizwan
925 512MB
I have made a Screen Lock which locks every thing open in a hidden mode. No one can use your computer without permission.
If you need that Screen Lock application you can contact me.

Regards
>> ALI <<
Feb 7 '08 #22
werks
220 100+
I have made a Screen Lock which locks every thing open in a hidden mode. No one can use your computer without permission.
If you need that Screen Lock application you can contact me.

Regards
>> ALI <<
Could you upload it..tnx Ali
Feb 7 '08 #23
Ali Rizwan
925 512MB
Could you upload it..tnx Ali
The error was with Progress Bar. It was not updated automatically with change of time and on startup.
Ok put your task bar on top of screen i mean place the task bar on the top and then run the application.

Or set your task bar to auto hide.

Thanks.

Regards
>> ALI <<
Attached Files
File Type: zip Sys Lock (Final).zip (51.8 KB, 383 views)
Feb 7 '08 #24
werks
220 100+
tnx Ali Rizwan.. it works great and nice interface with transaparency..
Feb 7 '08 #25
Ali Rizwan
925 512MB
tnx Ali Rizwan.. it works great and nice interface with transaparency..
Do you know the password??
Its asd

Regards
>> ALI <<
Feb 11 '08 #26
werks
220 100+
Do you know the password??
Its asd

Regards
>> ALI <<

Thanks Ali..


Better Than Yesterday ^^
Feb 11 '08 #27

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: C. Barnes | last post by:
Another useful code snippet... This allows you to take a non-threadsafe class, and automatically generate a threadsafe class. When a method is called for your class, it automatically locks the...
1
by: Connelly Barnes | last post by:
Another useful code snippet... This allows you to take a non-threadsafe class, and automatically generate a threadsafe class. When a method is called for your class, it automatically locks the...
0
by: Jenny - | last post by:
following is taken from postgresql-7.3.2/src/backend/storage/lmgr/readme: "If we are setting a table level lock both the blockId and tupleId (in an item pointer this is called the position) are...
1
by: Phil | last post by:
Hello I have a strange behaviour. I have a datagrid, with articles that have to be produced today or the day after. In this program one can see the articles, that have already been planned...
0
by: rattas | last post by:
Hi all I'm using DB2 V9.1.0 on SUSE Linux with kernel version 2.6.5. In the system I'm working on, there are 2 stored procedures which perform simple selects through different views. Those...
2
by: Roopesh | last post by:
Hi, In my mod_python project I am using mysql as the database. There is table card in which unique cards are stored. When a user request comes he has to get a unique card. In this situation I want...
4
by: Kevin Frey | last post by:
I have an assembly written in C++/CLI that also links in non-clr Native C++ (the C++/CLI wraps the Native C++ functionality). This assembly has an in-built tracing system that needs to be...
6
by: jmartmem | last post by:
Greetings, I have an Access 2002 continuous form called "Project Update Form" in which users can update project values presented in a series of combo boxes and text boxes. Three of the combo...
3
by: Frederick Tant | last post by:
DB2 V9.7 The DB is used by 1 application with no concurrent applications. I got the problem that large update/insert cause lock escalation, to solve the issue I set a lock on the table so...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.