List Info

Thread: Disable F5 key




Disable F5 key
user name
2007-10-05 10:57:57

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!

__._,_.___
Recent Activity
Visit Your Group
Yahoo! Finance

It's Now Personal

Guides, news,

advice & more.

Moderator Central

An online resource

for moderators

of Yahoo! Groups.

Yahoo! Groups

Join a yoga group

and take the stress

out of your life.

Re: Disable F5 key
user name
2007-10-05 23:59:41

Ciao,

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:
&gt; 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.
>
&gt; 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
&gt;
> Yahoo! Groups Links
&gt;
>
>
>;

__._,_.___
.

__,_._,___
[1-2]

about | contact  Other archives ( Real Estate discussion Medical topics )