Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Event Binding
Message
 
 
To
14/02/2002 17:15:14
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Title:
Miscellaneous
Thread ID:
00620031
Message ID:
00620867
Views:
16
>Larry,
>
>I've tried to implement your example. The idea you stated is exactly what I want to do. That is, to have multiple buttons run the same code and use the tag property of the button to discern exactly what button was clicked.
>
>Prior to Event Binding, I have been setting the onaction property to run a VBA macro that I had stored in a template that I'm attaching to the document via automation. Your example sets the OnAction to 'MyTest'. Is your example designed to run a macro that is stored somewhere? It does not seem that the _CommandBarButtonEvents_Click procedure ever runs even though I'm getting confirmation that the binding occured. EVENTHANDLER(oMyCB,oCB) returns .t.
>
>I don't like asking so many questions, I'd rather learn on my own but I can't find a source of information on this subject. If you know of a good one please pass it along.
>

John,
The macro information was just test stuff. It wasn't needed. You can use it to run anything you want.

I tested it by opening MS Project. Then I created the object in VFP and ran the SetupAddin method. I clicked on the newly created button and the click method defined in the class fired.

If you use the class to create something like a COM Addin, the click doesn't fire. I'm still working on figuring out why.
Larry Miller
MCSD
LWMiller3@verizon.net

Accumulate learning by study, understand what you learn by questioning. -- Mingjiao
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform