Parent / Child Interaction

  • Thread starter Thread starter Steven Smith
  • Start date Start date
S

Steven Smith

Hi guys

I'm sure this is really simple, but passing commands
between forms is a whole new thing to me, what I want to
do is when I load my child form I would like a menu item
on the parent to be enabled so I tried...

--\
Dim objParentForm As New MDIParentForm

objParentform.menuitem46.enabled = True
--/


in the childs loads event, with no success


regards steve
 
Steve, maybe I'm missing something but in your parent form code when you
create the child, why don't you enable the menu item there too. Eg.


Private Sub createChild()
Dim f As New Form
f.MdiParent = Me
f.Show()
MainMenu1.MenuItems.Item(whatever).Enabled = True
End Sub


Regards
Hexathioorthooxalate
 
Steven Smith said:
I'm sure this is really simple, but passing commands
between forms is a whole new thing to me, what I want to
do is when I load my child form I would like a menu item
on the parent to be enabled so I tried...

--\
Dim objParentForm As New MDIParentForm

objParentform.menuitem46.enabled = True
--/


in the childs loads event, with no success

I'd enable the item in the parent form when you load the child to avoid
accessing the parent from the child.
 
Ok that seems like a sound idea but how do I get access
to a list of indexes with their associated menu item names
 
sorry that was a silly question since menu's are arranged
in a heirarichal structure the indexes are obviously
built in the same fashion, so there's no need for me to
access the collection, thanks for your help
 
If this is the same Stephen Smith that was posting a few months ago and
working from a step by step book, you seem to have come a long way. If its
you, keep up the good work.

OHM
 
Yip still the same me...

the force grows stronger inside me with every day that
passes, thanks for all your help at the beggining of my
journey.

regards steve
 
* "Steven Smith said:
I'm sure this is really simple, but passing commands
between forms is a whole new thing to me, what I want to
do is when I load my child form I would like a menu item
on the parent to be enabled so I tried...

--\
Dim objParentForm As New MDIParentForm

objParentform.menuitem46.enabled = True
--/

\\\
DirectCast(Me.MdiParent, MDIParentForm).MenuItem46.Enabled = True
///

Make sure, the menuitems 'Modifier' property is set to 'Friend' or
'Public'.
 
Back
Top