0

I am trying to automate a help system. I have it set up so you right-click on any widget (Button, etc.) and one of the items is help. Selecting help causes a help file to display (PDF, HTML, or Wiki). Help positions the display to the paragraph that describes the widget. (The document is a hypertext document so the paragraph can contain cross links, etc.)

All of this is working. There is an implementation problem in that it is necessary to input the widget name manually when building the widget list for the help system. The problem is widgets can be renamed during development. New widgets can be added. Old ones deleted, etc. Maintenance becomes a problem.

So my question is, is it possible to obtain a list of widgets by form from a .net application being developed using Visual Studio? I don't mind scraping a set of files to extract the list, but I do need to automate obtaining the list so I can compare with the current list to determine any maintenance necessary to keep the help system in sync with the .net application.

Developer Studio does generate partial classes that do contain the information. Parsing these will be some effort since the parser must understand the format of the class. What would be nice is if Visual Studio had the ability to produce information about the structure of the app being developed.

  • Related/possibly duplicates: [How to get ALL child controls of a Windows Forms form of a specific type](https://stackoverflow.com/questions/3419159/how-to-get-all-child-controls-of-a-windows-forms-form-of-a-specific-type-button), [Recursive control search with LINQ](https://stackoverflow.com/questions/253937/recursive-control-search-with-linq) – Josh Part Dec 29 '22 at 18:35
  • This is not a duplicate of the above request because that one is for the dynamic case, i.e. during execution, and mine is for the static case, i.e. parse the source code. Actually a friend sent me an answer. Forms are identified by Form-name.Designer.vb (or .cs). Inside the form "new" identifies an allocation, and a regular expression of the form of: "Forms.*()$" identifies the widget. The main problem with that solution is Microsoft could change their format, which would break the code. That's the best answer so far. – user2515235 Dec 31 '22 at 08:34

0 Answers0