how to get the form

  • Thread starter Thread starter filip stas
  • Start date Start date
F

filip stas

how can I get the name of a form (or the form as object) to which a control belongs for example a menuitem. How can I get the form through the menuitem?
 
filip stas said:
how can I get the name of a form (or the form as object) to
which a control belongs for example a menuitem. How can I get
the form through the menuitem?

Have a look at the Container property - it *might* be what you want,
but I'm not going to guarantee it :) In the case of MenuItem, you might
be best to get the Menu using the Parent property first, then get the
container of the Menu.
 
filip stas said:
when I use the watch option during debugging. I'm looking to the
parent and the container properties. But at the end it is "Nothing"

Hmm... in that case, I'm afraid I don't know.
 
ok thx anyway. If i find a solution I'll post it ;-)
Jon Skeet said:
when I use the watch option during debugging. I'm looking to the
parent and the container properties. But at the end it is "Nothing"

Hmm... in that case, I'm afraid I don't know.
 
Hello,

filip stas said:
how can I get the name of a form (or the form as object) to which
a control belongs for example a menuitem. How can I get the form
through the menuitem?

Do not make multiposts. You already got answers in the
microsoft.public.dotnet.languages.vb ng.

HTH,
Herfried K. Wagner
 
Back
Top