Show new form in new thread?

  • Thread starter Thread starter wojo
  • Start date Start date
W

wojo

Hey guys, i'm having really hard time displaying new form from the
inside of Event hadler that runs within the process of the caller.
the new form shows but i cant focus on it and it just hungs there.

Private Sub on_PrivateMessage(ByVal vUserName As String, ByVal
vMessage As String) Handles objC.PrivateMessage
Dim lForm As frmPrivate

lForm = New frmPrivate
lForm.gNick = vUserName
lForm.DisplayMessage(vUserName, vMessage)
lForm.Visible = True

End Sub

if i use lForm.ShowDialog() then it paints okay and i can interact
with it but then the main form stops processing messages...

Please help.
 
You may have to call Application.Run on the new thread to start the
message loop.



Mattias
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top