View Single Post
  #8 (permalink)  
Old March 31st, 2008, 02:36 PM
angelboy angelboy is offline
Friend of Wrox
 
Join Date: Dec 2006
Location: , , .
Posts: 176
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Quote:
quote:Originally posted by robzyc
 This sounds like an interesting problem although I am confused..

Where are you calling this code from? If you are in the Form, use this, if you are outside the form, then surely you have instantiated a Form which either contains the component, or instantiated a form to Add to the component (or something)?

Rob
The Developing Developer
Currently Working Towards: MCAD C#
My Blog: http://www.robzyc.spaces.live.com
<center>"Nothing can stop the man with the right mental attitude from achieving his goal;
nothing on earth can help the man with the wrong mental attitude".

Thomas Jefferson</center>
lets me to explain this problem in another way.

many of controls has a Method called FindForm(), such as Button.
imaging there is a button on the Form1(the name of button is button1)

Now,
when you write " button1.FindForm(); ", it will be return Form1.

I Want to write a Method Like FindForm method Of the Button Class with samely action.

hope you understand