Easy Form Question. Load form from thread.

Hey guys, how do I load a form from a thread?

dim t as thread = new thread(address of mysub)
t.start

mysub
{
    dim frm as new formreport
    frm.show
}

 If I try this, the form opens and closes quickly. But if iopen the form without using the thread it opens fine. I'm confused.
LVL 3
Level10AccessAsked:
Who is Participating?
 
bramsquadCommented:
frm.ShowDialog
0
 
iboutchkineCommented:
try
frm.ShowModal
0
 
wguerramCommented:
mysub
{
    Application.Run(new formreport());
}
0
 
wguerramCommented:
VB code:

private sub mysub()
    Application.Run(new formreport())
end sub
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.