I need an application developped in Visal Studio 2015 written in VB that can capture windows AND controls of any running applications. The screen capture will occur in three occasions: when the mouse is pressed down, when is pressed up or when a keyboard key is pressed. Each screen capture will end with a sound (camera obturator. I can provide, if necessary the file). When capturing mouse events, the operator will click the mouse, will wait the sound showing the the capture was completed before releasing the mouse button to allow the capture to end correctly. After releasing the mouse, another screen will be captured. This is done in order to have the screen showing the screen tips and the button highlighted (done when the mouse starts going down) and the button pressed status (mouse up) when it is the case. In some cases both captures will be the same. This is not a problem.
When the program starts the user will click on the window to be captured (usually on the border or the caption to prevent any action). This will establish the rectangle for the all the captures. That is because if you have a Word application running and a save dialog box oppened I want both windows showing on the same captured screen when the save dialog border was clicked. A different sound must play showing the the screen capture will start after this. This first screen will not be captured. If the user clicks on a no window nothig happens.
Trying to explain better: The first screen clicked will not be captured but will establish the rectangle for the remaining captures (this is not valid for controls for wich the actual bounding rectangle will establish the image file size as explained below).
The operator will click on a window or a window control and two captures must occur: the whole window inside the rectangle established by the first click and, in another file the control alone. If this control belongs to a control group, another capture of this control group must be made. If possible this will occur up to three levels.
The application will allow the user to choose the location for saving the files, the prefix of the file names, the starting number and the number of digits. For example: [url removed, login to view] will be the name of the first capture. Controls will be captured as [url removed, login to view], [url removed, login to view] showing the correspondence of the capture
screen file and its controls.
The application will create a log file (txt file) showing the event that triggered the screen capture (mouse UP, Down Left or Right button, Key Up, Down wich key was pressed, RECT of the capture the image file name, control type, name and class if available. Each capture in a line, itens separeted by ";".
I am not a programmer but I have developped after a lot of googleing a system that does this, but only for NET framework applications. It works for example for Excel but not for applications running on a browser. SPY++ can detected the controls in this situation (browser application developped in PHP, for instance) but not my program that uses AutomationElement.
The screen capture must deal with the fact that some times we use zoom factor for texts, applications etc. For example, on my system the recommend setting is 125%. Must deal also with borders. Some application have extra invisible borders likeExcel.
Attached you will find some captures. Both the TXT file and the names of images does not obbey the convention established above. Controls have ZZZ_ prefix and its parent ZZZP_.
Note that the you can relate the controls and the screen captured by the number.