Creating an event by force.

M

Mr. X.

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

(for example : ToolStrip.ItemClicked event)

Thanks :)
 
F

Family Tree Mike

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()?
 
M

Mr. X.

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

Thanks :)
 
P

Phill W.

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.
 
A

Armin Zingler

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top