As I think the best way is to check the ClassName of the hwnd what I got in Application.Onmessage.
This is just like "disable context menu" is based on the "Internet_Explorer_Server" classname.
See the example:
procedure TDDGoogleMapsObject.ApplicationEvents1Message(var Msg: tagMSG;
var Handled: Boolean);
var
szClassName: array[0..255] of Char;
const
ie_name = 'Internet Explorer_Server';
begin
if Msg.message = WM_KEYDOWN then
if Msg.wParam = VK_F5 then begin
GetClassName(Msg.HWND, szClassName, SizeOf(szClassName));
if lstrcmp(@szClassName[0], @ie_name[1]) = 0
then Handled := True;
if not Handled
then beep;
end;
end;
This can check the source of the VK_F5 key. If it is from IE windows then we disable it.
Another case we allow to push it...
Thanks for your help:
dd