🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: borland.public.cppbuilder.nativeapi
2 messages
2 total messages Started by Przemo Mon, 28 Jan 2008 01:00
Disable WindowsKeys
#526
Author: Przemo
Date: Mon, 28 Jan 2008 01:00
24 lines
1413 bytes
Hi,

I would like to prevent an action from pressing both Windows Keys (it means 
I want to disable these keys). I wrote this code :

void __fastcall TFRM_MAIN::ApplicationEvents1Message(tagMSG &Msg,
      bool &Handled)

{
if (Msg.message == WM_KEYDOWN)
  if (Msg.wParam == VK_LWIN || Msg.wParam == VK_RWIN)
    {
    Handled = true;
    ShowMessage("It works !");
    }
}

However it is usless. The application message is catched, but AFTER the 
event. I see the dialogbox ("It works!"), but I see my windows' START menu 
as well.

What is wrong?

Przemo 
Re: Disable WindowsKeys
#528
Author: Asger Joergensen
Date: Mon, 28 Jan 2008 09:06
20 lines
1517 bytes
Hi Przemo 
 
 Przemo says:
> 
> However it is usless. The application message is catched, but AFTER the 
> event. I see the dialogbox ("It works!"), but I see my windows' START menu 
> as well.
> 
> What is wrong?

Nothing, thats how it is supposed to work, it is the same with 
ctrl + alt + del that should also brig up taskmanager (on XP)

The solution might be a keyboard hook implememted in a dll file
I never tried it, but I have often seen posts about it so try
and make a search on keyboardhook and dll.

Kind regards
Asger
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads