Listing forms in a project.

  • Thread starter Thread starter Todd Sparks
  • Start date Start date
T

Todd Sparks

Is there any way that I can get a list of all of the forms that are in my
project? I don't just need a list of open forms or anything like that, I
need to know all of the forms. I am writing my own form level security and
I want to be able to assign permissions to groups for each form, and if I
can 'discover' the forms in the project it would make it much easier to make
sure that I have defined permissions for all available forms.

Thanks,
Todd Sparks
 
Todd Sparks said:
Is there any way that I can get a list of all of the forms that are in my
project? I don't just need a list of open forms or anything like that, I
need to know all of the forms. I am writing my own form level security and
I want to be able to assign permissions to groups for each form, and if I
can 'discover' the forms in the project it would make it much easier to make
sure that I have defined permissions for all available forms.

Dim item As Type
For Each item In System.Reflection.Assembly.GetExecutingAssembly.GetTypes
If item.IsClass Then
Debug.WriteLine(item.Name)
End If
Next

See if that will get you what you want. It will probably have more than
you need where you will have to filter out the classes that are not forms,
or maybe you want all classes....

LFS
 
Hi,

If you have any more concerns on it, please feel free to post here.


Best regards,

Peter Huang
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.
 

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