Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Communication between ActiveX objects

Status
Not open for further replies.

mushin

Programmer
Oct 4, 2000
49
I have built a treeview activeX which resides in a frame
with several other activeX objects, (each with its own form). What's the best way of communicating a message (treeview image tag value) to other activeX objects within a common parent frame ?

So that as my user clicks on the treeview object, the tag value is changed and passed to the appropriated activeX receiver ? Should I go thru the common parant frame ? If so , how do I code a call to an objects parent cantainer ?
OR can I go directly to another activeX within the common Parent ????

I can do this in Progress (my native language) but am not familiar enough with VB to see how.....

Any help would be appreciated greatly......
 
Your treeview control can raise an event, which will be seen by any object that has declared it "Withevents".

In your framework, do this:
[tt]
Private Withevents MyTreeControl as CMyTreeControl
[/tt]
You can then add code in it's event procedure to handle the event. In your control, do this:
[tt]
Public Event ItemClicked(ByVal TheItemTag as Variant)
'
'
' Somewhere in your code...
'
RaiseEvent ItemClicked(DuhTree.CurrentItem.Tag)
[/tt]

Hope this helps.
Chip H.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top