I am trying to open a Form from a background thread (I think) because when I call formName.Show(); is freezes that form (Not the main form).
Goal:
When the user receives a new message, popup a newMessageFrm with the new message for reply.
Problem:
The new Form locks.
Here is the code I am using:
static void OnNewMessage(object sender, S22.Xmpp.Im.MessageEventArgs e)
{
if(CheckIfFormIsOpen(e.Jid.ToString(), e.Message.ToString()) == true){
} else
{
newMessageFrm tempMsg = new newMessageFrm(e.Jid.ToString());
tempMsg._msgText = e.Jid.ToString() + ": " + e.Message.ToString();
tempMsg.frmId = e.Jid.ToString();
tempMsg.Show(); //This locks up the application
}
}
I am using Visual Studio 2015, C#, and S22.Xmpp (As you can see from the code.)
When this event fires off the form does popup, but then locks.
Please let me know if you need any more information.