I would like to prevent the user pressing the 'F5' key on the
TWebBrowser. Refreshing the page may cause problems, especially if the
page is a frameset.
Thank you a lot!
You can disable accelerators like F5 using the OnTranslateAccelerator
event. Return S_OK for disabling an accelerator and S_FALSE for
enabling it, for example:
function TForm1.BrowserOnTranslateAccelerator(const lpMsg: PMSG;
const pguidCmdGroup: PGUID; const nCmdID: DWORD): HRESULT;
begin
if lpMsg.wParam = VK_F5 then
Result := S_OK // disable F5
else
Result := S_FALSE; // not F5, allow it
end;
(disclaimer: the above code wasn't tested).
Peter
On 10/5/07, Giacomo Drago < giacomogd1%40yahoo.it">giacomogd1yahoo.it> wrote:
> Dear developers,
> > I would like to prevent the user pressing the 'F5' key on the
> TWebBrowser. Refreshing the page may cause problems, especially if the
> page is a frameset.
>
> Thank you a lot!
>
> >
> Subscribe: delphi-webbrowser-subscribe%40yahoogroups.com">delphi-webbrowser-subscribeyahoogroups.com > Unsubscribe: delphi-webbrowser-unsubscribe%40yahoogroups.com">delphi-webbrowser-unsubscribeyahoogroups.com > List owner: delphi-webbrowser-owner%40yahoogroups.com">delphi-webbrowser-owneryahoogroups.com
>
> Yahoo! Groups Links
>
>
>
>