Enable application framework

  • Thread starter Thread starter Sachin Palewar
  • Start date Start date
S

Sachin Palewar

If you are using VS 2005 you can try looping through
MDIForm.MdiChildren, instead of application.openforms.

Regards,

Sachin Palewar
(Certified Scrum Master)

Palewar Techno Solutions
(Mobile Solutions for Your Business)
www.palewar.com
 
In a new WindowsForm project with default settings I wrote a loop:
For Each frm In My.Application.OpenForms

If frm.Name <> "MDIMain" Then

frm.Close()

End If

Next

Everything was fine until I decided to use Sub Main as Startup object. In
order to have it in the list of startup objects I had to uncheck Enable
application framework. Since that I have My.Application.OpenForms
highlighted and IDE says 'OpenForms is not a member of
'CMS.My.MyApplication'

How can I have OpenForms collection in my project if I use Sub Main as
Startup object?

Thank you

vovan
 
Thanks a lot for your good advice

vovan

Sachin Palewar said:
If you are using VS 2005 you can try looping through
MDIForm.MdiChildren, instead of application.openforms.

Regards,

Sachin Palewar
(Certified Scrum Master)

Palewar Techno Solutions
(Mobile Solutions for Your Business)
www.palewar.com
 
Back
Top