Invoke it on the UI-thread of
Form2
, like this;
private void button2_Click(object sender, EventArgs e)
{
f2.Invoke(new Action(delegate {
f2.Activate();
}));
}
Also, I changed
.Focus
to
.Activate
because I think that's what you're really after, but I might be wrong :)
Hope this helps,
Fredrik