Hallo,
Das ist mit dem Demo Browser von Toms auf meinem Rechner auch so.
Folgenden Code nutze ich in meinen Programmen, damit klappt es.
// ShortCut (Ctrl-C, Ctrl-O, etc.) in webBrowser2 einbauen
Delphi-Quellcode:
procedure TForm1.MyMessageHandler(var Msg: TMsg; var Handled: Boolean);
var
iOIPAO: IOleInPlaceActiveObject;
Dispatch: IDispatch;
begin
{ exit if we don't get back a webbrowser object }
if WebBrowser2 = nil then
begin
Handled := False;
Exit;
end;
Handled:=(IsDialogMessage(WebBrowser2.Handle, Msg) = True);
if (Handled) and (not WebBrowser2.Busy) then
begin
if FOleInPlaceActiveObject = nil then
begin
Dispatch := WebBrowser2.Application;
if Dispatch <> nil then
begin
Dispatch.QueryInterface(IOleInPlaceActiveObject, iOIPAO);
if iOIPAO <> nil then
FOleInPlaceActiveObject := iOIPAO;
end;
end;
if FOleInPlaceActiveObject <> nil then
begin
if (Msg.message = WM_KEYDOWN) and (Msg.wParam = vk_Escape) then
BuPanelMinClick(self);
if ((Msg.message = WM_KEYDOWN) or (Msg.message = WM_KEYUP)) and
((Msg.wParam = VK_BACK) or (Msg.wParam = VK_LEFT) or (Msg.wParam = VK_RIGHT)) then
//nothing - do not pass on Backspace, Left or Right arrows
else
FOleInPlaceActiveObject.TranslateAccelerator(Msg);
end;
end;
end;
Ich hoffe es hilft.
MfG Lannes