Hi,
I have designed a IP Softphone using C# Winforms..
Now, I want to add XMPP Chat also with it... But, Main thread already has lot of task to do,,,
So I have made a new thread and inside it I start the form... For the main thread to communicate with the form, I declared it as static outside of thread... My code look like this now,,,
public static XMPPForm xform = null ;
[STAThread]
static void Main(string[] args)
{
Thread thr = new Thread(delegate ()
{
tf = new XMPPForm();
tf.ShowDialog();
});
thr.Start();
if(tf != null && !tf.IsDisposed)
tf.Label1.Text = "SomeText Here";
}
My Question is.... will it have any problem in this approch ??
Is it fine to go like this ??
This will include showing and hiding of the form from main UI also,,,