C# Why does this code not show a GUI properly?
- by Tom
class Program
{
static String ChannelName = null;
static Form1 f;
static void Main()
{
f = new Form1();
f.Show();
try
{
MY CODE WHICH CALLS INTO ANOTHER CLASS BUT CANNOT PASS THE GUI INSTANCE AS
IT USES REMOTING
}
}
}
I know this isnt the best/normal way to do it, but i need to write data to the GUI from a class which has bo instance of the GUI so i was going to call Program.method() and use a function to write to the GUI in program. However when i run the above my GUI displays but with the windows hourglass?
Could someone show me a quick fix so that i can still crudely show the GUI, let the application code run and then later write to the GUI?