Welcome to Dream.In.Code
Become a C++ Expert!

Join 149,946 C++ Programmers for FREE! Get instant access to thousands of C++ experts, tutorials, code snippets, and more! There are 1,405 people online right now. Registration is fast and FREE... Join Now!




Computer locking sofware

2 Pages V  1 2 >  
Reply to this topicStart new topic

Computer locking sofware

Moezzie
31 Dec, 2007 - 03:05 PM
Post #1

New D.I.C Head
*

Joined: 25 Nov, 2007
Posts: 48


My Contributions
Ive been coding c++ for a long time now and im kind of tired of the kind of useless programms ive been making so far(notpads, database aplications, etc). So to make it a little more exiting i thought about making an application that locks your computer untill the right password is entered.
It would be kind of like the password dialog that lets you turn the screensaver off.

I was wondering if someone could give me some advice on how to go about this.
The most part of this software shouldnt be to diffiult do code. Im more worried about the locking part.

My first thought was to put the application on top of everything else in fullscreen. This does'nt prevent shortcuts thig i suppose. And how would i make dissable alt+tab?

Any other ideas?
Thanks for your help.

This post has been edited by Moezzie: 31 Dec, 2007 - 11:12 PM
User is offlineProfile CardPM
+Quote Post

Tom9729
RE: Computer Locking Sofware
31 Dec, 2007 - 03:43 PM
Post #2

Debian guru
Group Icon

Joined: 30 Dec, 2007
Posts: 1,590



Thanked: 12 times
Dream Kudos: 325
My Contributions
This would be pretty operating system dependent I think. Do you planning on making this for Windows or Linux?

User is online!Profile CardPM
+Quote Post

Moezzie
RE: Computer Locking Sofware
31 Dec, 2007 - 09:49 PM
Post #3

New D.I.C Head
*

Joined: 25 Nov, 2007
Posts: 48


My Contributions
QUOTE(Tom9729 @ 31 Dec, 2007 - 04:43 PM) *

This would be pretty operating system dependent I think. Do you planning on making this for Windows or Linux?

Yeah,i would think so to. Im mostly working with linux and mac. So some kin of unix-approach would be good i think.
User is offlineProfile CardPM
+Quote Post

born2c0de
RE: Computer Locking Sofware
31 Dec, 2007 - 10:59 PM
Post #4

printf("I'm a %XR",195936478);
Group Icon

Joined: 26 Nov, 2004
Posts: 4,029



Thanked: 38 times
Dream Kudos: 2800
Expert In: 80x86 Assembly, C/C++, VB6, VB.NET, C#, J2SE, Win32 API, Reversing

My Contributions
Why not write a screensaver?
You can code the Password feature into the Unload Event of the ScreenSaver.
That takes care of the locking and the Alt+Tab problem.
User is offlineProfile CardPM
+Quote Post

Tom9729
RE: Computer Locking Sofware
1 Jan, 2008 - 12:35 AM
Post #5

Debian guru
Group Icon

Joined: 30 Dec, 2007
Posts: 1,590



Thanked: 12 times
Dream Kudos: 325
My Contributions
There are a lot of Linux screen saver programs that support screen locking (gnome-screensaver, xscreensaver, xlockmore). I don't know how easy their source code is to read, and I'm not suggesting you copy it, but taking a look there just to see how they did it might be a good start.
User is online!Profile CardPM
+Quote Post

Moezzie
RE: Computer Locking Sofware
4 Jan, 2008 - 07:44 PM
Post #6

New D.I.C Head
*

Joined: 25 Nov, 2007
Posts: 48


My Contributions
QUOTE(Tom9729 @ 1 Jan, 2008 - 01:35 AM) *

There are a lot of Linux screen saver programs that support screen locking (gnome-screensaver, xscreensaver, xlockmore). I don't know how easy their source code is to read, and I'm not suggesting you copy it, but taking a look there just to see how they did it might be a good start.

This was a great idea. I ended up going through the source of a very basic software called xtrlock. It turned out not to be very hard stuff. Basically just opening a window in full screen on top of everything else that caches all keyboard and mouse events.

This was very easy to do with Qt. Right now im kind of stuck with the shortcuts like alt+F4 or atl+tab, because they make it pretty easy to get around the lock. I'll figure that one out pretty soon though i guess.

I have one last question though. Do you guys know a easy way to make a main window in Qt transparent. I have been trying to do this for the last couple of hours but cant find a working way. Thanks for your help guys!
User is offlineProfile CardPM
+Quote Post

Tom9729
RE: Computer Locking Sofware
4 Jan, 2008 - 08:57 PM
Post #7

Debian guru
Group Icon

Joined: 30 Dec, 2007
Posts: 1,590



Thanked: 12 times
Dream Kudos: 325
My Contributions
I've never done anything with Qt, but Google turned this up.

Don't know if that's helpful or not.

This post has been edited by Tom9729: 4 Jan, 2008 - 08:58 PM
User is online!Profile CardPM
+Quote Post

Moezzie
RE: Computer Locking Sofware
5 Jan, 2008 - 12:04 PM
Post #8

New D.I.C Head
*

Joined: 25 Nov, 2007
Posts: 48


My Contributions
QUOTE(Tom9729 @ 4 Jan, 2008 - 09:57 PM) *

I've never done anything with Qt, but Google turned this up.

Don't know if that's helpful or not.

Yeah, ive read that through, in fact i thoink ive read most things google returned on that subject. It seems fairly easy to make widgets transparent, but i just can figure out how to make the main window transparent.
User is offlineProfile CardPM
+Quote Post

Tom9729
RE: Computer Locking Sofware
5 Jan, 2008 - 01:50 PM
Post #9

Debian guru
Group Icon

Joined: 30 Dec, 2007
Posts: 1,590



Thanked: 12 times
Dream Kudos: 325
My Contributions
Does it have to be real transparency?

If you're just trying to make a glass wall (where the user can see the desktop and windows, but can't do anything to them), you could probably get away with taking a screen shot when the screen lock is activated, and setting that as the background of the main window.
User is online!Profile CardPM
+Quote Post

lockdown
RE: Computer Locking Sofware
5 Jan, 2008 - 02:43 PM
Post #10

D.I.C Regular
Group Icon

Joined: 29 Sep, 2007
Posts: 376



Thanked: 1 times
Expert In: PC, Support

My Contributions
I am not really a Linux user but I have found a Windows application (commercial) but might give you some ideas for your program. It is called Screen Pass and is basically a screen locking application that adds features to the basic windows screen saver locking application. I am not sure if they have a linux version provided by this company but it has some decent features. We uses it at our office and its pretty secure and works great with AD (Active Director).

It might give you some ideas regarding it.

Also just for my two cents wouldn't you want to have a screen overlay (screen saver or image ) that prevents users form seeing the main screen. If someone leaves a import application or information up someone would be able to still read some parts of it.

This post has been edited by lockdown: 5 Jan, 2008 - 02:44 PM
User is offlineProfile CardPM
+Quote Post

Tom9729
RE: Computer Locking Sofware
5 Jan, 2008 - 02:46 PM
Post #11

Debian guru
Group Icon

Joined: 30 Dec, 2007
Posts: 1,590



Thanked: 12 times
Dream Kudos: 325
My Contributions
QUOTE(lockdown @ 5 Jan, 2008 - 03:43 PM) *

Also just for my two cents wouldn't you want to have a screen overlay (screen saver or image ) that prevents users form seeing the main screen. If someone leaves a import application or information up someone would be able to still read some parts of it.

My opinion as well, but perhaps he is only interested in window transparency so he can create a "fade to black" effect when launching the screensaver/locking the screen?
User is online!Profile CardPM
+Quote Post

lockdown
RE: Computer Locking Sofware
5 Jan, 2008 - 02:51 PM
Post #12

D.I.C Regular
Group Icon

Joined: 29 Sep, 2007
Posts: 376



Thanked: 1 times
Expert In: PC, Support

My Contributions
QUOTE(Tom9729 @ 5 Jan, 2008 - 03:46 PM) *

QUOTE(lockdown @ 5 Jan, 2008 - 03:43 PM) *

Also just for my two cents wouldn't you want to have a screen overlay (screen saver or image ) that prevents users form seeing the main screen. If someone leaves a import application or information up someone would be able to still read some parts of it.

My opinion as well, but perhaps he is only interested in window transparency so he can create a "fade to black" effect when launching the screensaver/locking the screen?


That would be really cool to see. I would assume their has to be some sort of value that can be modified to control the time and intensity of the overlay built in.

I know in Ubuntu their is a way to can make the command line window disappear or fade out. That allows you to see the command line on the desktop back round and work with it at the same time.
User is offlineProfile CardPM
+Quote Post

2 Pages V  1 2 >
Reply to this topicStart new topic
Time is now: 1/8/09 05:04PM

Be Social

Dream.In.Code RSS Feed Dream.In.Code LinkedIn Group Follow Us On Twitter

Live C++ Help!

C++ Tutorials

Reference Sheets

C++ Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month