掲示板システム
ホーム
アクセス解析
カテゴリ
ログアウト
動的にバグを回避する (ID:19147)
名前
ホームページ(ブログ、Twitterなど)のURL (省略可)
本文
例です。 TTabSheetを継承して、property Browser: TWebBrowserを追加したものを使用。 毎回IOleInPlaceActiveObjectを取得するので、FOleInPlaceActiveObjectの宣言は不要かと思います。 procedure TForm1.MsgHandler(var Msg: TMsg; var Handled: Boolean); var iOIPAO: IOleInPlaceActiveObject; Dispatch: IDispatch; wb: TWebBrowser; begin Handled := False; if not Assigned(PageControl1.ActivePage) then begin Exit; end; wb := TTabBrowser(PageControl1.ActivePage).Browser; if wb = nil then begin Exit; end; Handled := (IsDialogMessage(wb.Handle, Msg) = True); if (Handled) and (not wb.Busy) then begin Dispatch := wb.Application; if Dispatch <> nil then begin Dispatch.QueryInterface(IOleInPlaceActiveObject, iOIPAO); end; if iOIPAO <> nil then begin 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 begin end else begin iOIPAO.TranslateAccelerator(Msg); end; end; Dispatch._Release; end; end;
←解決時は質問者本人がここをチェックしてください。
更新する
戻る
掲示板システム
Copyright 2021 Takeshi Okamoto All Rights Reserved.