DoubleClick-event 
Author Message
 DoubleClick-event

Hi.
I'm creating a inputform that needs to appear as a user double clicks a
shape. This should work if I put the following code in the
EventDblClick-cell in the shapesheet of that shape.

' -> Double click results NOT in a messagebox
Event:EventDblClick:=RUNADDON("MyMsgBox()")

' Function in ThisDocument
Sub MyMsgBox()
   MsgBox("DoubleClick")
End Sub

No such luck, the messagebox does not appear.
But if I put the following code in EventDblClick-cel, then the messagebox
does appear.

' -> Double click results in a messagebox
Event:EventDblClick:=RUNADDON("MsgBox(""MyDoubleClick"")")

I'm using Visio 2000 on Win95

What am I doing wrong?

Har Mestrom

=======================================

ShapeSheet:
Section:Events



Mon, 13 Sep 2004 02:06:28 GMT  
 DoubleClick-event
Hi,

Your Macro "MyMsgBox" is defined in "ThisDocument"
(which is a Class Module).
So, you have to use "Object.Method" syntax to refer to any
Procedure defined in ThisDocument.
Also, do not use the Braces, just the macro name is
required.

so, use =RUNADDON("ThisDocument.MyMsgBox")

Thanks,

Firoz

Quote:
>-----Original Message-----
>Hi.
>I'm creating a inputform that needs to appear as a user
double clicks a
>shape. This should work if I put the following code in the
>EventDblClick-cell in the shapesheet of that shape.

>' -> Double click results NOT in a messagebox
>Event:EventDblClick:=RUNADDON("MyMsgBox()")

>' Function in ThisDocument
>Sub MyMsgBox()
>   MsgBox("DoubleClick")
>End Sub

>No such luck, the messagebox does not appear.
>But if I put the following code in EventDblClick-cel,
then the messagebox
>does appear.

>' -> Double click results in a messagebox
>Event:EventDblClick:=RUNADDON("MsgBox(""MyDoubleClick"")")

>I'm using Visio 2000 on Win95

>What am I doing wrong?

>Har Mestrom

>=======================================

>ShapeSheet:
>Section:Events

>.



Mon, 13 Sep 2004 17:57:45 GMT  
 DoubleClick-event
Hi Firoz,

Thanks for your respons.
Your suggestion worked well.
But I put MyMsgBox in a Global Scope and that worked fine
as well.

Thanks again,

Har M.

Quote:
>-----Original Message-----
>Hi,

>Your Macro "MyMsgBox" is defined in "ThisDocument"
>(which is a Class Module).
>So, you have to use "Object.Method" syntax to refer to
any
>Procedure defined in ThisDocument.
>Also, do not use the Braces, just the macro name is
>required.

>so, use =RUNADDON("ThisDocument.MyMsgBox")

>Thanks,

>Firoz

>>-----Original Message-----
>>Hi.
>>I'm creating a inputform that needs to appear as a user
>double clicks a
>>shape. This should work if I put the following code in
the
>>EventDblClick-cell in the shapesheet of that shape.

>>' -> Double click results NOT in a messagebox
>>Event:EventDblClick:=RUNADDON("MyMsgBox()")

>>' Function in ThisDocument
>>Sub MyMsgBox()
>>   MsgBox("DoubleClick")
>>End Sub

>>No such luck, the messagebox does not appear.
>>But if I put the following code in EventDblClick-cel,
>then the messagebox
>>does appear.

>>' -> Double click results in a messagebox
>>Event:EventDblClick:=RUNADDON("MsgBox

(""MyDoubleClick"")")

- Show quoted text -

Quote:

>>I'm using Visio 2000 on Win95

>>What am I doing wrong?

>>Har Mestrom

>>=======================================

>>ShapeSheet:
>>Section:Events

>>.

>.



Mon, 13 Sep 2004 21:13:41 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Does the shape object has a doubleClick event?

2. Doubleclick event

3. Capturing a Shape's DoubleClick Event from VB

4. Catching the DoubleClick Event

5. StatusBar DoubleClick Event

6. How to create an doubleclick event handler for a column in a datagrid

7. DoubleClick event on Listbox

8. Combobox DoubleClick event NEVER FIRES?!?!?

9. TreeView (Node DoubleClick Event) Help!!

10. Disabling DoubleClick event

11. newbi question: how do I trap a doubleclick event from app x

12. DoubleClick event: Left mouse button or Right mouse button?

 

 
Powered by phpBB® Forum Software