Link to home
Start Free TrialLog in
Avatar of jitu_sharma
jitu_sharma

asked on

How to lock the system !!

Hi all!,
I want to make a program in C++ which on execution should close all the running application other than itself and remove the desktop. Only window of this program should be shown and nothing else. All the keys of keyboard must be deactivated.

Please help me making such program ..

Thanks and Regards,
Jitendra Sharma
Avatar of Omycron
Omycron

How do you want to reactivate windows?
What should be this program for?
Do you want to lock the mouse too?

Omycron
Avatar of jitu_sharma

ASKER

hi omycron,
Thanks for rply!

I don't want to reactivate the other windows.

I just want to write a simple application which has the control of desktop. Like as soon as we start application it should hide the desktop with the help of handle returned by GetDesktopWindow() function.

Yeah! I also want to lock the mouse,

Hope this will be a bit more clear...

Thanks amd regards,
Jitendra Sharma
Yes but what sense does this program make?
Do you want to bother someone with this program, or is it useful in a way I do not see?

Regards
Omycron
Yes but what sense does this program make?
Do you want to bother someone with this program, or is it useful in a way I do not see?

Regards
Omycron
One wonders how you will regain control of your PC?
hey Omycron!

This is very useful for me.
As far as locking mouse is concerned I made a mistake. Believe me I need to solve this problem. I'd much appreciate if you can help me solving this problem.

Thanks
Jitendra sharma
Okay.  I will be more forward.  Are you writing a virus?  If so, you will not get any help here.  WHAT is the usefulness of this program?  If you give a good reason for wanting to complete these unusual actions you may be able to get some help.
Since you say you are writing in C++ you may be able to get a better solution (if truly a legit request) from the C++ area - https://www.experts-exchange.com/cplusprog/
I am not writing any virus. I have this assignment to finish. This program when it starts just need to close the desktop and lock the keys of keyboard. It won't lock the mouse. One execution of this program one can only shut the PC down. That shut down option will be given in the program. This would be a dialog based program.

Hey slink9 and omycron, If you guys can help me you will be much appreciated.
If you don't want then no problem.

Thanks a lot...
Regards,
Jitendra Sharma
Nope.  We don't do homework either.  My last homework assignment was about fourteen years ago.  I did it by myself so I don't plan on doing someone else's homework for them.
Slink actually the homework policy has been relaxed a little. We as members are now asked to not give direct answers to homework question but try and direct the user in a direction to help them figure it out for them selves. However I have asked CS is to step in here and make a decision on this quesion.
ASKER CERTIFIED SOLUTION
Avatar of ComTech
ComTech

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Why should we go to Google and find the links when the questioner can do the same?  Others can give pointers.  I will resist.  Hey, it's easy to resist when I don't do C++ programming!!