.show() doesn't show the form VB.NET

I've global module whuch has sub main() from where the application starts and also a callback function. I load my MDI by deciding in the callback which MDI is to be loaded. C dll tells UI about this in the callback. Now once an MDI is loaded, say the callback in  global module recvs another instruction to load another MDI/form. Here if i use new form.show(), the control goes into the new form's load event and does all, but the form comes up and disappears. If i use showdialog(), then the form is seen but the control doesn't come back unless the newly opened form is closed. this is what i dont want. i want to return as well from the callback after opening the new form. .show() allows me that, but the form doesn't stay, and showdialog() doesn't allow be to retrn. and in the .show() scenario when i close the overall applicaiton it is not closed properly sometimes as the new form which is not seen but there in memory.

I've used Threads as well in the callback with new form in showdialog(), but even that behaves like a .show() now. and definite error of Null reference comes up when closing.

how can i make new form appear with returing from callback possible.

pl. help

pawan


pawan_marwarAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Bob LearnedCommented:
If this is the first form in the application, use Application.Run(form).

Bob
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Mikal613Commented:
dim FRm as new Formname

frm.ShowDialog()
0
YZlatCommented:
Dim f1 As New myForm()
        f1.Show()
0
Cloud Class® Course: Microsoft Exchange Server

The MCTS: Microsoft Exchange Server 2010 certification validates your skills in supporting the maintenance and administration of the Exchange servers in an enterprise environment. Learn everything you need to know with this course.

RobertRFreemanCommented:
Do not dispose the frm after opening it.

f1.show()
'Do not do either of these:  f1.dispose or f1.close()
0
RobertRFreemanCommented:
I mention the above because I've seen the following:

f1.show()
f1.dispose()

which will show the form, running all events and then dispose it immediately thereafter.
show() will continue running code in the parent form, showdialog() will not.
0
RobertRFreemanCommented:
Hey, I want points too. :-P

I don't think Mikal613 or YZlat answered the question.  It sounds like the asker already got that far.
 
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
.NET Programming

From novice to tech pro — start learning today.

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.