Possible to include an image in the meta data in code? VS 2013 - visual-studio-2013

I would like to be able to include a screenshot of a control inside my code, this way making control identification easier for new members on my team, is such a thing possible?
Maybe even the ability to just have the image on a network share with the path in a comment, and then have a plugin that when hovering over the link brings up the image?
EDIT (More detail):
I'm creating a test project, the application under test has over 1000 controls, some of them are similar in name and purpose, this can make it difficult at times for developers to reuse the API I am creating because the control name is simply not enough for quick identification of the control in use.
I use the word API very loosely too, none of this stuff will be consumed in web services, and it will always be white box with developers including a project reference and have direct access to the source code.
For every form in my application (The test one), I have a controls.cs file where all the controls for that form in the application under test are listed - This is where I want the hover to screenshot ability in the control definitions.
Another sure factor is that all developers will be using VS2013 (For now the base version), later this could be update 1 or 2.
As the initial author and senior developer on this project, these hover / image references (in the code) will be as useful to me personally as any 3rd party developers, or any later developers to join the initiative.
Thanks again, and I added a bounty!

I believe you can use Whole Tomato's free SourceLinks Visual Studio extension to do what you want - or at least get pretty close to it.
Built-in Functionality:
Out of the box, the extension allows you to specify comment patterns you want users to be able to take an action on. Once the patterns are specified, SourceLinks will highlight any occurrences of those patterns in the text editor. You will be able to double click the highlighted items and perform a pre-configured action (such as opening a link in an internal/external browser, or launching an executable).
You can see an example in the SourceLinks configuration dialog shown below:
(source: wholetomato.com)
So you could use this feature pretty painlessly to define a keyword such as Control Image and then put comments like the following in your code:
// Control Image: my_smart_list.jpg
SourceLinks would allow you double click this text, and you could have that configured to launch the image (using a file:// or http:// url depending on how and where your images are stored) either inside Visual Studio in it's internal browser, or in an external browser.
Custom Tooltips!
Now, if you want to put in some more effort into this and actually write some code, then SourceLinks allows you to create API Extensions to display custom tooltips when the user hovers over the marked text in the editor. The default installation of SourceLinks comes with sample API extensions that you can copy to create your own. See the article linked at the very top of the answer for more details on these samples.
This post in the SourceLinks forum informs us that SourceLinks expects the custom API Extension to return the tooltip value as FlowDocument XAML text. This is awesome news for us, because a FlowDocument can contain many types of elements, including formatted text, hyperlinks, and images.
Imanges in a Flow document can be specified both inline as well as externally.
Hope this helps!

I would use doxygen -- create the images somewhere in the source tree and use doxygen comments. You can embed the \image command in source comments (see docs) and doxygen will generate all the HTML documentation from there. I think doxygen is a great tool for documenting a codebase as you can generate the documentation directly from comments in the source and distribute or host the HTML separately.

Related

How to obtain a list of widgets in a windows form

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.

How do you access content in a word document? (like Grammarly does)

I want to create a program that works like an autocomplete box for Microsoft Word. For that, I need some way of reading the contents of the page and getting the positions of words. I know that Microsoft has made a Javascript API for creating plugins in the form of side panes, but that's not what I'm after.
Grammarly manages to read the contents of the document and even underline specific words.
Maybe they have some agreement with Microsoft? Or could they be using some hacky solution? I did try to use win32api with both Python and C++ but didn't succeed.

What is imgMain control in visual Basic 6?

I'm using a VB6 application as a reference and have come across imgMain. I'm assuming its an image control, however, I cannot find the object on any of the forms. It's used to load the image. I'm just not sure what's going on with this. I'm assuming its an IMAGE CONTROL, but I cannot find this on any of the forms? it's mentioned a lot of times in teh application as it lets you view incoming faxes and stuff.
Without having a look on source code i assume It might be custom user control that was created for some reasons probably to extend basic picturebox control.
One thing i can advise you is to further inspect code and dig to code of this custom control. If code for this control is not available then see what methods and properties instances of that particular control uses and compare them with regular picturebox.

Where to find the tags used in theme short codes? As well as the general tags used in pyroCMS?

I was wondering where to find the tags to type to take advantage of shortcodes programmed in themes. Many themes have them, such as the one below. However I can never find the information required to make use of them in the read me's or on site documentation. Which makes using them impossible for me. Is there a specific html, css, or php file that is consistent to each theme and shows them?
Given the lack of write ups on what tags to use suggests that theme creators expect people to know which file to find them in.
https://www.pyrocms.com/uploads/default/store/listings/11-25-2012_9-41-20_PM.png
https://www.pyrocms.com/uploads/default/store/listings/11-25-2012_9-41-20_PM.png
On a more PyroCMS rather than theme specific note, is there a list of all tags and their uses? Such as {{ settings:site_name }}, or the page body tag. Every link I have found to a list says that the list has been moved.
Thank you for your time once again.
Open up your file directory and navigate to:
path/to/your/files/system/cms/plugins/theme.php
Each one you can use is listed here along with an example in the function description. Each plugin in this folder is lined out the same way (files, session, asset, etc). You should be able to view each one and play with how to incorporate them into your project.
Edit: Also, you can find more information here: http://docs.pyrocms.com/2.1/manual/plugins
Notice that this is specific to version 2.1. If you are not using 2.1, in the top navigation add click on documentation and then select your version.

MS Access 2007 Load Image to Ribbon

I'm trying to get to grips with customising a Ribbon Bar for a converted A2003 app. I'm trying to work out how to use my own custom images on button controls in the ribbon. Can anyone point me to an example for Access 2007 that can do this pls?
Please check this MSDN article (Adding Custom Dynamic Menus to the Office Fluent User Interface) and see if it helps you. Furthermore I would point you to the specifying image resource MSDN article, because you need different sized images for different sized buttons - read the bottom of my post to make it easier on you.
I believe there was also custom images within the official MS example on ribbon extensibility with Access 2007 - I hope this example is sufficient, it helped me a great lot.
My personal favorite is just using a graphical UI editor, such as the "Custom UI Editor Tool". With it you just click a button to insert an image and it works (as explained in this tutorial). Even better as the Custom UI Editor is the IDBE Ribbon Creatror - my personal tool of choice. A shareware version is available from the website.
I have a working example class object you can use that makes this a good deal less code.
http://www.members.shaw.ca/albertKallal/Ribbon/ribbon.htm
The above lets you use a very much like previous style code approach. So, to set a picture for a ribbon, you can go:
meRib("Button1").Picture = "HappyFace.png"
The same download has a working form in which some images in the ribbon change from choices made on the form.

Resources