By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
429,423 Members | 1,601 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 429,423 IT Pros & Developers. It's quick & easy.

Help with Visual Studio 2005 Forms.Show and Forms.ShowDialog

P: 2
I am converting a VB6 app to .NET Visual Studio 2005. I have about 20 forms. Ths app starts with Main_form, and then passes to a "loop" of about 14 forms that pass from 1 to another, with the possiblity of passing back and forth. The cylce can go on repeatledly without passing back to the "parent" form Main_form. My problem is everything flows along until I try to "repeat" the form.show/form.dialog. Then the form can't display, or I get the exception that says a resource has not been released. I've tried my.forms.userform1.show, my.forms.userform1.showdialog, each followed by me.close or without the me.close. It doesn't seem to make a difference. I can't dim a new form each time because the user is entering data as they go along and they want to "loop" thru to review what they've entered. I'm hoping that I'm doing something wrong. Any help would be appreciated greatly!!!
Thanks,
jlb
Sep 27 '07 #1
Share this Question
Share on Google+
3 Replies


Shashi Sadasivan
Expert 100+
P: 1,435
I am converting a VB6 app to .NET Visual Studio 2005. I have about 20 forms. Ths app starts with Main_form, and then passes to a "loop" of about 14 forms that pass from 1 to another, with the possiblity of passing back and forth. The cylce can go on repeatledly without passing back to the "parent" form Main_form. My problem is everything flows along until I try to "repeat" the form.show/form.dialog. Then the form can't display, or I get the exception that says a resource has not been released. I've tried my.forms.userform1.show, my.forms.userform1.showdialog, each followed by me.close or without the me.close. It doesn't seem to make a difference. I can't dim a new form each time because the user is entering data as they go along and they want to "loop" thru to review what they've entered. I'm hoping that I'm doing something wrong. Any help would be appreciated greatly!!!
Thanks,
jlb
i suppose you would have one MDI form
Any forms to be opened in them should be as a show (rather than a show dialog)
but then any forms derived from these form should preferably be of showDialog, so that you can force the user to travel a certain path with your forms
and avoid spagetti, and even multiple forms editing values of the same exact row, even leading to concurrency issues

Have you also debugged ure application finding out where the errors are occouring?

cheers
Sep 27 '07 #2

P: 2
jlb
i suppose you would have one MDI form
Any forms to be opened in them should be as a show (rather than a show dialog)
but then any forms derived from these form should preferably be of showDialog, so that you can force the user to travel a certain path with your forms
and avoid spagetti, and even multiple forms editing values of the same exact row, even leading to concurrency issues

Have you also debugged ure application finding out where the errors are occouring?

cheers
This is what happens:
I have a mainform. Then I have say subfrm1, subfrm2, subfrm3 etc. In mainform I code "my.forms.subfrm1.show". In subfrm1 I will have "my.forms.subfrm2.show", in subfrm2 I will do "my.forms.subfrm3" and then 3 will do "my.forms.subfrm1.show". Everything works until I try the my.forms.subfrm1.show from subfrm3. Then, subfrm1 will not dispay. I do a me.close each time after I do the .show. I've also tried .showdialog (with and without the close.) I hope that makes sense.
jlb
Sep 27 '07 #3

Shashi Sadasivan
Expert 100+
P: 1,435
Hi
I tried replicating it, but the spegetti still works for me
Please go to subform3 and make sure that when u do subform1.show you do not do subform1.close ... this obvioulsy might be one of the reasons why subform1 dosent show up.
As far as your exception goes, I am unable to replicate it.
If you can replicate it in another test application let me know

cheeers
Sep 27 '07 #4

Post your reply

Sign in to post your reply or Sign up for a free account.