Adding keypress event to the visio document

X

xargon

Hi,

I had asked about processing keyboard inputs from the visio document. I
wanted to ignore the keyboard accelerator events. Well, I still do not
have a proper way to do so. However, I am using a student solution and
this might be useful for someone:

Private Sub m_vsoWindow_KeyDown(ByVal KeyCode As Long, ByVal
KeyButtonState As Long, CancelDefault As Boolean)
If KeyButtonState = visKeyControl Then
MsgBox "Visio shortcuts are not permitted. "
End If
End Sub

Private Sub m_vsoWindow_KeyUp(ByVal KeyCode As Long, ByVal KeyButtonState
As Long, CancelDefault As Boolean)
If KeyButtonState = visKeyControl Then
MsgBox "Visio shortcuts are not permitted. "
End If
End Sub


The document states that setting CancelDefault to True should block the
default processing of the keyboard event. However, that is not the case
and I could not get it to work. If any experts out there, could make it
work, please post it so we can all use it!

Thanks and cheers!
xargon
 
J

junethesecond

It is very difficult for me to solve this problem, as i cannot understand
what HELP document saying about CancelDefault.
Anyway, the document indicates for you to refer "VisEventProc" method and
"QueryCancelSuspend" event for father details.
 
X

xargon

I tried the visEventProc method. It throws a run time exception everytime
you try to hook a keyboard event to it. Every other event works fine :( It
is really weird!

Xargon
 

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