i have read this question How to Create Form from within non gui thread C# but it didnt helped me.
I have a List of Tables which has a List of Players and each Player has his own Form (i seperated it in player.cs and playerform.cs)
The Problem is: if i make the Table inherited from Form (Show the Form and make visible=false, so its not shown) then i can make an Methodinvoker
//table.cs
class Table : Form{
var player = Players.First();
this.Invoke(new MethodInvoker(player.ShowForm));
//player.cs
void ShowForm() {
var form = new PlayerForm();
form.show();
}
this is working, without any problems or sideeffects. but a little nasty, inherit the Class from Form, just to use Invoke. (my table dont need a Form, so i want to fix this)
how can i use invoke, if i dont have a form?
thanks