I have a cross thread error when i try to run my app. Here's basically how my class files interact with each other:
I have 3 files:
In control.cs is a function that checks for user input. When i press the L on my keyboard then control.cs see's this and calls a function in main.cs which then calls a function in gui.cs. In gui.cs i try to add a control back onto the main.cs form. But that's where i get the cross thread error.
control.cs -> main.cs -> gui.cs
Then inside of gui.cs i have something like:
main.Controls.Add ( myWindow );
Which appearently isn't allowed to do it like that. Anyone any idea what i could try to solve this??