Project.Forms.Count()????

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

hello, i need to know if theres a way of doing that... some way of getting
the number of forms, that a windows application contains...


i need to browse all the forms. and make a list of all the forms...


thanks!!!
 
Rothariger said:
hello, i need to know if theres a way of doing that... some way of getting
the number of forms, that a windows application contains...


i need to browse all the forms. and make a list of all the forms...

Do you want a list of all opened form instances or all form types of your
application? For the first, you can maintain a application-global list of
open forms, for the latter you'll have to dig into 'System.Reflection', the
'Assembly' class and its methods and properties.
 
If you mean at design-time, you can do it with an add-in or macro that
starts with DTE.Solution.Projects, then Project.ProjectItems, then navigates
recursively ProjectItem.ProjectItems, etc. For each ProjectItem you test if
the property ProjectItem.Properties.Item("SubType") is "Form". The Generate
HTML Documentation feature of my add-in (below) shows a table with the files
of each project and the type of the file.

--

Best regards,

Carlos J. Quintero

MZ-Tools: Productivity add-ins for Visual Studio .NET, VB6, VB5 and VBA
You can code, design and document much faster.
Free resources for add-in developers:
http://www.mztools.com
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top