Disabling F1 help key for Active X control

D

Denis Zavadil

Software being utilized: Microsoft Development Environment 2003 Version
7.1.3088
Microsoft Framework 1.1 Version 1.1.4322
Microsoft Office Visio Professional 2003 (11.3216.5606) - Active X control

I would like to disable the F1 key help contents and in turn be able to
catch the F1 key press event in one of the Active X Key events.

I've unsuccessfully attempted this through the Accelerator object. I've
also unsuccessfully attempted to disable cut and paste through Ctrl + C & V
keystrokes using VisUICmds.

Any thoughts?
 
D

Denis Zavadil

Mark,

Thanks for the info. I've read up a bit regarding Add-ons and don't believe
it pertains to my problem. I have an Mdi application which has existing,
user specified Visio documents which contain a significant amount of data. A
user clicks on an element and may view a javadoc with information associated
with the selected item. I would like to replace the Visio help displayed
when the F1 key is pushed with the javadoc associated with the selected
element. As such I require the ability to trap the F1 keystroke. My
understanding of Add-ons are that they are external files or programs, I
have no such environment or need.

Any other thoughts?
 
M

Mark Nelson [MS]

I don't think the fact that you are not a traditional add-on makes any
difference. The way to programmatically intercept the keystroke is to use
the OnKeystrokeMessageForAddon event. Don't let the name get you.

--
Mark Nelson
Microsoft Corporation

This posting is provided "AS IS" with no warranties, and confers no rights.
 
D

Denis Zavadil

Mark,

The event does not fire! Here's my test event:

Private Function AxDrawingControl1_OnKeystrokeMessageForAddon(ByVal sender
As Object, ByVal e As
AxMicrosoft.Office.Interop.VisOcx.EVisOcx_OnKeystrokeMessageForAddonEvent)
As Boolean Handles AxDrawingControl1.OnKeystrokeMessageForAddon

MsgBox("Key Pressed!")

End Function
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top