sharing control between two forms

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • changshen
    New Member
    • Aug 2006
    • 1

    sharing control between two forms

    Hi, All

    Someone might help me for this will be appreciated.

    I want two forms to share same instance of a control. That is, say you have a treeview control tvCtl in form one frmOne, you want this treeview control also shows up in form two frmTwo. So when you do something changes on tvCtl at frmOne, frmTwo will show the change simutanously. That is, this instance of treeview control shows up at two forms simutanously, or two forms own the same instance of this treeview control and show up.

    Think in this way: This tvCtl is an object, two forms frmOne and frmTwo both reference to the same object. (memory handle?) so any change in this object will be shown up in both forms.

    Thanks in advance
  • sashi
    Recognized Expert Top Contributor
    • Jun 2006
    • 1749

    #2
    Hi Chang,

    i don't think you be able to do that in vb6.. perhaps what you can do is.. stored the values of each nodes in a variable and used this variable to draw the second treview on 2nd form.. this is just a suggestion.. pls wait to see what other might say or suggest.. take care my fren..

    Comment

    Working...