Lowyat.NET Forums

Welcome Guest ( Log In | Register )

LYN wins Intel-Lenovo-Tangs Blogathon challenge. Thank you everybody!
 
RSS feedBump TopicReply to this topicStart new topicStart Poll

Outline · [ Standard ] · Linear+

> Lock keyboards keys like Ctrl , Alt, Del, using vb.net

arroyos
post Jun 15 2006, 08:37 PM
Show posts by this member only |This post's rating (0+, 0-) | Post #1


Casual
***

Group: Junior Member
Posts: 389
Ratings earned: 0+, 0-
Ratings given: 0+, 0-

Joined: Aug 2005
From: [MyFeS.INC]





hie,i need some help here..anyone out there,if have any knowledge or links about this, please post me the answer..thanx in advance..

i would like to know how to block user from executing task managers,means i wan to block the usage of keys like ctrl , alt and delete...as well as alt + tab and alt+f4...any idea how to block all these keyboards keys using vb.net codes????


thnx in advance
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
alvinz_c
post Jun 15 2006, 09:38 PM
Show posts by this member only |This post's rating (0+, 0-) | Post #2


Casual
***

Group: Junior Member
Posts: 407
Ratings earned: 0+, 0-
Ratings given: 0+, 0-

Joined: Oct 2004




Hi, you can try to restrict it in key press event but obviously you need more considerations. What about the users run the task manager under Start->Run with command of taskmgr?


Cheers
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
dopodplaya
post Jun 16 2006, 08:33 AM
Show posts by this member only |This post's rating (0+, 0-) | Post #3


Look at all my stars!!
*******

Group: Senior Member
Posts: 2,088
Ratings earned: 0+, 0-
Ratings given: 0+, 0-

Joined: Jun 2006





QUOTE(arroyos @ Jun 15 2006, 08:37 PM)
hie,i need some help here..anyone out there,if have any knowledge or links about this, please post me the answer..thanx in advance..

i would like to know how to block user from executing task managers,means i wan to block the usage of keys like ctrl , alt and delete...as well as alt + tab and alt+f4...any idea how to block all these keyboards keys using vb.net codes????
thnx in advance
If you're thinking of restricting keystrokes in your Application Windows Forms, then you can apply the restriction on event methods. But, if you were thinking of controlling the system key input operational, then VB .NET doesn't do that by default. You may need the access that via appropriate Win32 API using DLLImport method. Since VB .NET is part of the .NET Framework, accessing priviledged Win32 API is quite a work.
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
arroyos
post Jun 16 2006, 12:41 PM
Show posts by this member only |This post's rating (0+, 0-) | Post #4


Casual
***

Group: Junior Member
Posts: 389
Ratings earned: 0+, 0-
Ratings given: 0+, 0-

Joined: Aug 2005
From: [MyFeS.INC]





QUOTE(dopodplaya @ Jun 16 2006, 08:33 AM)
If you're thinking of restricting keystrokes in your Application Windows Forms, then you can apply the restriction on event methods. But, if you were thinking of controlling the system key input operational, then VB .NET doesn't do that by default. You may need the access that via appropriate Win32 API using DLLImport method. Since VB .NET is part of the .NET Framework, accessing priviledged Win32 API is quite a work.
*



hie..there thanx for the reply..i mean how do u restrict keys like ctrl? using what technique..if it is a key like "A" or "8"..i can restrict it using ASCII value....but how bout keys like ctrl??? i want to disable the start menu button as well..any links u all have??? example is better..thnx a lot man..
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
nexus-
post Jun 16 2006, 09:02 PM
Show posts by this member only |This post's rating (0+, 0-) | Post #5


The intrepid coward
Group Icon
Retired Forum Administrator

Group: VIP
Posts: 3,744
Ratings earned: 0+, 0-
Ratings given: 0+, 0-

Joined: Jan 2003
From: Sydney, Australia






You cannot intercept the Ctrl+Alt+Del key combination as Windows have exclusive control over it to allow users to verify an authentic Windows login box (e.g. on w2k machine where you need to press ctrl+alt+del before you enter your username/pass).
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
arroyos
post Jun 16 2006, 09:56 PM
Show posts by this member only |This post's rating (0+, 0-) | Post #6


Casual
***

Group: Junior Member
Posts: 389
Ratings earned: 0+, 0-
Ratings given: 0+, 0-

Joined: Aug 2005
From: [MyFeS.INC]





QUOTE(nexus- @ Jun 16 2006, 09:02 PM)
You cannot intercept the Ctrl+Alt+Del key combination as Windows have exclusive control over it to allow users to verify an authentic Windows login box (e.g. on w2k machine where you need to press ctrl+alt+del before you enter your username/pass).
*



actually i m developing a desktop access control system...i only intercept that keys once my program starts...and further more,my system will be implemented in win xp....i wants to create a login screen for my program, which will lock the pc...and user need to login in order to use their pc..(not the window login screen here i referring to, i m doing my own login screen...

any idea???? neeed help.. rclxub.gif
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
KLKS
post Jun 17 2006, 05:25 PM
Show posts by this member only |This post's rating (0+, 0-) | Post #7


Getting Started
**

Group: Junior Member
Posts: 277
Ratings earned: 0+, 0-
Ratings given: 0+, 0-

Joined: Jan 2003
From: Kuala Lumpur Malaysia





do ur research on system wide hooks and low level keyboard filters (system drivers) wink.gif
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
asc2
post Jun 17 2006, 05:49 PM
Show posts by this member only |This post's rating (0+, 0-) | Post #8


Casual
***

Group: Junior Member
Posts: 311
Ratings earned: 0+, 0-
Ratings given: 0+, 0-

Joined: Jan 2003




you cannot control ctrl + alt + del from your application because before the message reach your application the OS already got it
you must intercept the keypress by "hooking" some function in windows, replacing the original function in windows and put your own processing there before calling the actual windows default function
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
SincerePrayer
post Jun 17 2006, 09:17 PM
Show posts by this member only |This post's rating (0+, 0-) | Post #9


love to pray
Group Icon

Group: Elite
Posts: 1,094
Ratings earned: 0+, 0-
Ratings given: 0+, 0-

Joined: Jun 2005





arroyos,


Virtually we are not suppose to intercept this combination of keys. But doing that, you might create some loop hole in the windows security.

Anyway you can find some info here. One limitation, you need to convert the code to VB.NET.


Happy Coding smile.gif
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
arroyos
post Jun 18 2006, 12:05 AM
Show posts by this member only |This post's rating (0+, 0-) | Post #10


Casual
***

Group: Junior Member
Posts: 389
Ratings earned: 0+, 0-
Ratings given: 0+, 0-

Joined: Aug 2005
From: [MyFeS.INC]





QUOTE(SincerePrayer @ Jun 17 2006, 09:17 PM)
arroyos,
Virtually we are not suppose to intercept this combination of keys.  But doing that, you might create some loop hole in the windows security.

Anyway you can find some info here. One limitation, you need to convert the code to VB.NET.
Happy Coding smile.gif
*



thnx bro...i will work it out....thnx KLKS and asc2 also!

sincerePrayer...the code is in vb.do u think it work if i used the convertor in visual studio.net ?

This post has been edited by arroyos: Jun 18 2006, 12:30 AM
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
SincerePrayer
post Jun 18 2006, 07:05 AM
Show posts by this member only |This post's rating (0+, 0-) | Post #11


love to pray
Group Icon

Group: Elite
Posts: 1,094
Ratings earned: 0+, 0-
Ratings given: 0+, 0-

Joined: Jun 2005





arroyos,


I haven't try to convert that piece of code. Since no specified code I see so far, you can give it a try. Even not 100%, you might get most of the code converted.


Happy Coding smile.gif
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
arroyos
post Jun 18 2006, 01:34 PM
Show posts by this member only |This post's rating (0+, 0-) | Post #12


Casual
***

Group: Junior Member
Posts: 389
Ratings earned: 0+, 0-
Ratings given: 0+, 0-

Joined: Aug 2005
From: [MyFeS.INC]





QUOTE(SincerePrayer @ Jun 18 2006, 07:05 AM)
arroyos,
I haven't try to convert that piece of code. Since no specified code I see so far, you can give it a try.  Even not 100%, you might get most of the code converted.
Happy Coding smile.gif
*



hmm.okie.i will try it out..i will tell u the result once i test it out.thnx bro!
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

Bump TopicReply to this topicTopic OptionsStart new topic
 



----debug section please ignore----
Lo-Fi Version Time is now: 23rd November 2009 - 09:32 PM
All Rights Reserved 2003-2009 Vijandren Ramadass (~living on a prayer~)