Creating an event by force.

  • Thread starter Thread starter Mr. X.
  • Start date Start date
M

Mr. X.

Hello,
I want to create an event by force.
How can I do that ?

(for example : ToolStrip.ItemClicked event)

Thanks :)
 
Hello,
I want to create an event by force.
How can I do that ?

(for example : ToolStrip.ItemClicked event)

Thanks :)

Do you mean SomeToolstrip.Items (0).PerformClick()?
 
Thanks,
specific, this help.
I need more generic solution (I would like to do any event, not only the
PerformClick event).

Thanks :)
 
I need more generic solution (I would like to do any event, not only the
PerformClick event).

If a class doesn't provide you with a method to do something, then
perhaps it's something that you shouldn't do?

Why do you want to fire off any event from any control?

Regards,
Phill W.
 
Am 11.06.2010 00:06, schrieb Mr. X.:
Hello,
I want to create an event by force.
How can I do that ?

(for example : ToolStrip.ItemClicked event)

Thanks :)

You are taking the wrong approach. If you want
to do something, call a method. If you want
the same thing to be done if the item is clicked,
call the same method from the click event handler.
 
Back
Top