i want find a list of form of my application in code?
-
combo_ci, If you are using an MDI form, you have a collection of them
this.MdiChildren
http://msdn2.microsoft.com/en-us/library/system.windows.forms.form.mdichildren.aspx[^] Regards, Gareth.
-
What would the purpose of said list be? Are you wanting to control the forms such as showing/hiding them or some other type master/slave function between the forms? Just making a list of winforms wouldn't do much without other interfaces between each form. That being the case, how many forms are you using that you need a list of them? If you have so many you need a list then you should in most cases be using a MDI parent...
-Spacix All your skynet questions[^] belong to solved
-
What would the purpose of said list be? Are you wanting to control the forms such as showing/hiding them or some other type master/slave function between the forms? Just making a list of winforms wouldn't do much without other interfaces between each form. That being the case, how many forms are you using that you need a list of them? If you have so many you need a list then you should in most cases be using a MDI parent...
-Spacix All your skynet questions[^] belong to solved
-
i want to create a security pack that select a form name in application and set that a user can view or edit that form ... and save the name of form in database and in load of form with pass name of form to a sp an db find that user canVeiw Or Can Eidt
Hi, you can get a list of all open forms from Application.OpenForms Property you can create a list of all existing forms using reflection; if you make them all inherit say MyFormBase and put them in a single assembly, then interrogate that assembly for any type inheriting from MyFormBase. Hope this helps.
Luc Pattyn [Forum Guidelines] [My Articles]
This month's tips: - before you ask a question here, search CodeProject, then Google; - the quality and detail of your question reflects on the effectiveness of the help you are likely to get; - use PRE tags to preserve formatting when showing multi-line code snippets.