• Welcome to Valhalla Legends Archive.
 

Dissabling Buttons.

Started by OuTLawZGoSu, April 14, 2004, 08:11 PM

Previous topic - Next topic

OuTLawZGoSu

How can I make it so when a person presses the Windows button or CTRL+ALT+DEL, it wont work. Instead, it will show a message, " Error".

If the same meathod can be used for all the buttons, post that here too.

Grok

#1
Quote from: OuTLawZGoSu on April 14, 2004, 08:11 PM
How can I make it so when a person presses the Windows button or CTRL+ALT+DEL, it wont work. Instead, it will show a message, " Error".

If the same meathod can be used for all the buttons, post that here too.

Replace the keyboard driver.

P.S.  Not likely with VB.

OuTLawZGoSu

I meant only in the program, not all the programs.
I made a password program to prevent pricks ( my dad ) from gettin on my computer. But when I hit the Window Button ( between Left CTRL and Left ALT ), you can see the taskbar. Then you can just use the " Show the Desktop " feature. I need to prevent that.

Also, since I dont know how to dissable CTRL+ALT+DEL, I named the program " Norton antivirus" and put the same icon as NAV. My dad isn't THAT smart to figure out that it's not the real norton. Cleaver eh? But, not to take any chances, I need to dissable those buttons.


Fr0z3N

Try GetAsyncKeyState using the API


Public Declare Function GetAsyncKeyState Lib "user32" (ByVal vKey As Long) As Integer

Grok

If there's something you don't want seen, just use pgp tools to encrypt it.

hismajesty

Log the keys and compare.

Telos

There used to be a semi-hackish way to do this by making the OS think the screensaver was enabled but it disabled those keys systemwide while the program was running

iago

Pull out your IDE cable and take it with you when you leave, kthx
This'll make an interesting test for broken AV:
QuoteX5O!P%@AP[4\PZX54(P^)7CC)7}$EICAR-STANDARD-ANTIVIRUS-TEST-FILE!$H+H*


Networks

#8
Quote from: iago on April 15, 2004, 08:24 AM
Pull out your IDE cable and take it with you when you leave, kthx

Who is grounding who? lol

OuTLawZGoSu

#9
Quote from: Fr0z3N on April 14, 2004, 11:38 PM
Try GetAsyncKeyState using the API


Public Declare Function GetAsyncKeyState Lib "user32" (ByVal vKey As Long) As Integer


So how would I put that in a Form_Keypress()

If GetAsyncKeyState = "13" then
'message
ElseIf GetAsyncKeyState = (ALT KEY Here) Then
'message
EndIf


I'm at a skool computer right now so I cant test it.

iago

Quote from: Networks on April 15, 2004, 09:05 AM
Quote from: iago on April 15, 2004, 08:24 AM
Pull out your IDE cable and take it with you when you leave, kthx

Who is grounding who? lol

Haha, I initially read that to mean electrical grounding, but I didn't think he wanted to electrocute his dad.

Why don't you just log off and not give him access to your Windows password?

Heck, I find a Screensaver password is more than enough to keep my family away from my .. . stuff.
This'll make an interesting test for broken AV:
QuoteX5O!P%@AP[4\PZX54(P^)7CC)7}$EICAR-STANDARD-ANTIVIRUS-TEST-FILE!$H+H*


Tuberload

Quote from: iago on April 15, 2004, 11:44 AM
Heck, I find a Screensaver password is more than enough to keep my family away from my .. . *porn*.

:P
Quote"Pray not for lighter burdens, but for stronger backs." -- Teddy Roosevelt
"Your forefathers have given you freedom, so good luck, see you around, hope you make it" -- Unknown

iago

Quote from: Tuberload on April 15, 2004, 01:03 PM
Quote from: iago on April 15, 2004, 11:44 AM
Heck, I find a Screensaver password is more than enough to keep my family away from my .. . *porn*.

:P

haha, I was going to type "po..... stuff" but I decided that was too obvious :)
This'll make an interesting test for broken AV:
QuoteX5O!P%@AP[4\PZX54(P^)7CC)7}$EICAR-STANDARD-ANTIVIRUS-TEST-FILE!$H+H*


Eli_1

#13
Quote from: OuTLawZGoSu on April 15, 2004, 10:42 AM
So how would I put that in a Form_Keypress()

If GetAsyncKeyState = "13" then
'message
ElseIf GetAsyncKeyState = (ALT KEY Here) Then
'message
EndIf

I'm at a skool computer right now so I cant test it.

No, if your going to put it in keypress, you could just use KeyAscii. If you looked at the prototype of GetAsyncKeyState you'd see that you need to pass something to that function. So it would be:

if GetAsyncKeyState(13) = -32767 Then
   '// doSomething();
end if


OuTLawZGoSu

#14
Quote
No, if your going to put it in keypress, you could just use KeyAscii. If you looked at the prototype of GetAsyncKeyState you'd see that you need to pass something to that function. So it would be:

Oh ye, I forgot about KeyAscii. Aight I'll try that.

EDIT: Eh.. wats the ascii code for the ALT, CTRL, and the "Windows" Button ( the one located between alt and ctrl).

I tryed:

Private sub Btn1_Click()
text2.text = asc(text1.text)
End sub

'didnt work.


Quote from: Telos on April 15, 2004, 07:53 AM
There used to be a semi-hackish way to do this by making the OS think the screensaver was enabled but it disabled those keys systemwide while the program was running

Think you can find more info on this?