Right click event for the shape

0

0rbital

Oleg said:
Hello
Does anyone know how to detect right-click event on the shape in visio?
basically I need to modify some context menu items (Actions) that I have
previously created for that shape

url:http://www.ureader.com/gp/1130-1.aspx

I don't know if you are doing it through the drawing control or not but
through the drawing control in my app in c# I'm doing this:

event for drawing control:
this.axDrawingControl1.MouseUpEvent += new
AxMicrosoft.Office.Interop.VisOcx.EVisOcx_MouseUpEventHandler(this.axDrawingControl1_MouseUpEvent);

//disable right click menu
private void axDrawingControl1_MouseUpEvent(object sender,
AxMicrosoft.Office.Interop.VisOcx.EVisOcx_MouseUpEvent e )
{
if (e.button == 2) //trap right mouse button to get rid of
Visio context menu
{
//put your code here I used to display a message box saying
right click s are disabled.
}

}
 
O

Oleg

I see what you mean, but I am not drawing the controls.
it's a pity Visio guys didn't expose Mouse events for the shapes!!!
 
A

AlEdlund

it is exposed on the shape. check out the 'EventDblClick" cell in the
"events" section of the shape sheet.
al
 
N

Nikolay Belyh

Unfortunately you can't do that with shape-sheet only. You'll need
some code behind.

Try searching this group with keywords "context menu".
AFAIR the "shape-dependent context menu" has been discussed here many
times already.

Kind regards, Nikolay.
 
O

Oleg

Spasibo Nikolay!
I found a work around to my issue,
but not to the right click event on the shape.

Interestingly enough there is Application.MouseUp event, but it doesn't have
a SENDER object
Application.MouseUp += new
Microsoft.Office.Interop.Visio.EApplication_MouseUpEventHandler(Application_MouseUp);
Application_MouseUp(int Button, int KeyButtonState, double x, double y, ref
bool CancelDefault)
{}
 
P

Paul Herber

Here is a same kind of Q & A in COMODO site.
http://forums.comodo.com/digital_ce...d_digital_signing/vba_timestamp-t11654.0.html

There seems at least another one person that encounterd the problem.
Now I am trying Self Cert on my machine only.

I'll be interested to know what works. My timestamping on exe, dll and
vsl now works, but not for VBA. Luckily this isn't at all critical for
my business and I don't have any customers asking about this (please
enable your irony detectors).

(P.S. hope you don't mind, I've reset the subject back to the
original)
 

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