Click here to Skip to main content
15,900,696 members
Please Sign up or sign in to vote.
4.00/5 (1 vote)
See more:
Hi, tell to me, please, as I can receive the project, all forms objects in C# do not use Assembly.
Thanks!
Posted
Comments
ALBINO_TIGER 1-Apr-11 4:52am    
To receive a name and the text of all forms

1 solution

There is not "project" during run-time. You can get all forms owned by the Application. Please see System.Windows.Forms.Application.OpenForms. This is all you really need.

[EDIT]
Additionally (if you need some extra information), you could handle each event FormShown, FormClosing, FormClose to track each form and collect the information in an container held by the Application. Sub-class Application to implement some reporting interface known by each form (throw available sigleton property also called Application). Easy enough.

—SA
 
Share this answer
 
v2
Comments
Eduard Keilholz 1-Apr-11 4:34am    
Wow, you understood this question?? I'm amazed! I don't know if your answer is correct, but +5 for being able to have a response to this question ;)
Sergey Alexandrovich Kryukov 1-Apr-11 4:41am    
Thank you very much, Eduard.

OK, do you remember it's 1st of April today.
Didn't you see my 1st of April post yet?
Please see this (and of course my "Answer"): http://www.codeproject.com/Answers/175616/WARNING-Black-Line-of-Death-in-windows-phone-7.aspx

:-)
--SA
Eduard Keilholz 1-Apr-11 4:43am    
Yep, you already got my 5 there!
Sergey Alexandrovich Kryukov 1-Apr-11 4:41am    
OP commented:

I know about it, everything are necessary to me, but thanks.
Sergey Alexandrovich Kryukov 1-Apr-11 4:43am    
You're welcome.
Thanks for accepting this Answer, but...
You see, if this is what you know already, you need something else. You should explain your ultimate purpose, may be it needs a different approach. What are you try to achive?

Thank you.
--SA

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900