cancel
Showing results for 
Search instead for 
Did you mean: 

ole web browser, prevent F8 key from firing

Former Member
0 Kudos

Hi all,

I have added an OLE Web Browser control to a window in PB11.2 and load a PDF document.  This works fine.

But I want to prevent the user from pressing F8/right-clicking within the ole.  Because doing so allows the user to see the adobe reader toolbar (F8) / context-menu (right-click) which allows him to other stuff (save/print) which we dont want the user to do.

I have been able to prevent the user from right-clicking inside the ole control via the following code (in "other" event):

IF wparam = 516 THEN

    //disable right-click

    ole_control.POST SetFocus( )

END IF

However, am unable to prevent key event from being fired inside the ole control.  Does any one have any ideas/suggestions?

Thanking you in advance.

Cheers,

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

You can add a menu item (with no code in the event) to the window's menu object that uses F8 as the shortcut. Uncheck Visible property but make sure the Enabled is checked.

Former Member
0 Kudos

Hi Roland,

Thanks for your reply.

I have decided to stop trying these work arounds (disable right-click, F8, etc)...

instead, I now generate the pdf (as read-only) by encrypting it thus automatically disabling the save/print/etc functionality from the adobe reader.

unfortunately, the mail button cannot be disabled (no idea how? why?).  So, I leave it here...

Best,

-a