pawan_marwar
asked on
.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
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
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Do not dispose the frm after opening it.
f1.show()
'Do not do either of these: f1.dispose or f1.close()
f1.show()
'Do not do either of these: f1.dispose or f1.close()
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.
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.
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.
I don't think Mikal613 or YZlat answered the question. It sounds like the asker already got that far.
f1.Show()