Help with Addin



I am trying to create an addin that will loop through all my projects in a
solution and all the forms with in a project to set a form property.

How can I test the project item to see if it is a form?

foreach (ProjectItem p in theProject.ProjectItems)

{

System.Diagnostics.Trace.WriteLine("ProjectItem = " + p.Name);

// Check to see if its a c# file Is there a better way

if (p.Name.Substring(p.Name.Length - 3, 3) == ".cs")

{

}

}



.



Relevant Pages

  • Help with Addin
    ... I am trying to create an addin that will loop through all my projects in a ... solution and all the forms with in a project to set a form property. ... Prev by Date: ...
    (microsoft.public.dotnet.languages.csharp)
  • RE: Can it be done
    ... Although I'm not an expert in this area, with a few minutes of searching I ... > I was trying to create an addin to do this but I can't figure out how to ... > loop through the forms. ... Prev by Date: ...
    (microsoft.public.dotnet.general)
  • Re: doevents
    ... Accessing a form property, or ... a control on the form would cause it to stay loaded. ... Perhaps, instead of just exiting the loop, you really need to ...
    (microsoft.public.vb.general.discussion)
  • Re: Uninstall Addin
    ... loop. ... > UNLESS your addin is unloading itself so you're sure it's loaded. ... > Sub AddinDeactivate1() ... > Dim wkb As Workbook, ai As AddIn, sIndex As String ...
    (microsoft.public.excel.programming)
  • AddOleObject() fails if a key is pressed
    ... The addin adds a number of OLE objects to the form in a loop. ... I tried disabling Events, Calculation etc but could not get a way to ...
    (microsoft.public.excel.programming)