Grupos de Google ya no admite nuevas publicaciones ni suscripciones de Usenet. El contenido anterior sigue siendo visible.

aclaración sobre inhabilitar CTRL+ALT+SUPR y ALT+TAB

Visto 31 veces
Saltar al primer mensaje no leído

alf

no leída,
28 ene 2000, 3:00:0028/1/00
a
Perdón, quizás no me expliqué bien, mi problema es que lo tengo resuelto
para windows 95, pero mi problema es bajo windows NT ya que el código no
funciona

Guillermo 'guille'

no leída,
31 ene 2000, 3:00:0031/1/00
a
Hola,


En NT es algo más complicadillo y con VB creo que está difícil... aunque
puede que no imposible, (para el que se atreva).


Esto está tomado de una respuesta del Dr. GUI (de la MSDN) sobre una
pregunta como la tuya (o casi):

---xxx---
For Windows NT version4.0 Service Pack 3 and later, you can install a
low-level keyboard hook (WH_KEYBOARD_LL) that can detect these system
keyboard events and eat all of them, except for CTRL+ALT+DEL. This exception
is for security reasons.
---xxx---

Y si te sirve este código para C/C++ ( y quieres convertirlo), está sacado
del artículo de la MSDN (o en la Knowledge Base de Microsoft):
HOWTO: Disable Task Switching on Win32 Platforms
ID: Q226359

---xxx---
Windows NT 4.0 Service Pack 3 and Later and Windows 2000

Applications can disable ALT+TAB or CTRL+ESC by installing a low-level
keyboard hook. A low-level keyboard hook (WH_KEYBOARD_LL) is installed by
calling SetWindowsHookEx. For more information on Window hooks see the
"Hooks" overview in the Platform SDK documentation.

The following is a sample low-level keyboard hook procedure that disables
CTRL+ESC, ALT+TAB, and ALT+ESC:


LRESULT CALLBACK LowLevelKeyboardProc (INT nCode, WPARAM wParam, LPARAM
lParam)
{
// By returning a non-zero value from the hook procedure, the
// message does not get passed to the target window
KBDLLHOOKSTRUCT *pkbhs = (KBDLLHOOKSTRUCT *) lParam;
BOOL bControlKeyDown = 0;

switch (nCode)
{
case HC_ACTION:
{
// Check to see if the CTRL key is pressed
bControlKeyDown = GetAsyncKeyState (VK_CONTROL) >>
((sizeof(SHORT) * 8) - 1);

// Disable CTRL+ESC
if (pkbhs->vkCode == VK_ESCAPE && bControlKeyDown)
return 1;

// Disable ALT+TAB
if (pkbhs->vkCode == VK_TAB && pkbhs->flags & LLKHF_ALTDOWN)
return 1;

// Disable ALT+ESC
if (pkbhs->vkCode == VK_ESCAPE && pkbhs->flags & LLKHF_ALTDOWN)
return 1;

break;
}

default:
break;
}
return CallNextHookEx (hHook, nCode, wParam, lParam);
}
---xxx---

Aquí tienes algunos valores que seguramente no encontrarás en el fichero de
las declaraciones del API:

Public Const LLKHF_ALTDOWN = &H20&

Public Const WH_KEYBOARD_LL = 13

' KBDLLHOOKSTRUCT
Type tagKBDLLHOOKSTRUCT
vkCode As Long
scanCode As Long
flags As Long
time As Long
dwExtraInfo As Long
End Type

Nos vemos.
Guillermo
P.S.
Si lo "traduces" no te olvides de enviar el código... cuando tenga el
Win2000 instalado lo probaré...

---
Te invito a visitar mis páginas sobre Visual Basic
http://guille.costasol.net/
==================================================

alf <mvi...@retemail.es> wrote in message
news:#APeoDda$GA.259@cppssbbsa04...

Juan Marugán

no leída,
2 feb 2000, 3:00:002/2/00
a
On Fri, 28 Jan 2000 21:48:22 +0100, "alf" <mvi...@retemail.es> wrote:

En http://www.somser.com existe un control ActiveX llamado
ENABLEDISABLE.ZIP en el área de programación que hace exactamente lo
que quieres.

Saludos

alf

no leída,
2 feb 2000, 3:00:002/2/00
a
muchas gracias Guille, lo intentaré

ALF

0 mensajes nuevos