I have written a programm about Mdi . the toolbar belogs to the parent form. when i click one button in the child form , i want to use the parent's reference of the toolbar . but can i do ?
hope anyone's help.
best regards!
Printable View
I have written a programm about Mdi . the toolbar belogs to the parent form. when i click one button in the child form , i want to use the parent's reference of the toolbar . but can i do ?
hope anyone's help.
best regards!
You can simply create a public property in parent window code
something like that:
'in parent.vb
' I'm not sure about the path to the toolbar component so check it first
public readonly propety myToolBar as window.form.toolbar
get
return me.toolbar1
end get
end property
'in your form
'you need a reference to your parnt window:
' 1)you can get through me.parentwindow if i'm not wrong
' 2)but I would recommend you to store a referense to all your windows includng parent one somewhere in shared file in form of shared objects
private sub some_sub
mObjParent.myToolbar.WHATEVER
....
end sub