I have a working method
something_Click(object sender, EventArgs e)
{
code
}
...
It of course executes after someone clicks the element. What I need to do is, to execute this method immediately after the element appears on the screen (it is StripStatusLabel). I have tried just to add a call of the method to beginning of the code, but it did nothing.
You can call
Button.PerformClickon your button in aForm.Loadevent handler.You might also want to consider moving that logic into its own method, and call that method from both the button handler and the
Loadevent, as this will be more clear. (It’s obviously code you want triggered on more than just a “button click”).