C# Why does this code not show a GUI properly?
Posted
by Tom
on Stack Overflow
See other posts from Stack Overflow
or by Tom
Published on 2010-05-28T12:29:03Z
Indexed on
2010/05/28
12:31 UTC
Read the original article
Hit count: 182
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?
© Stack Overflow or respective owner