From Team Developer SqlWindows Wiki
Jump to: navigation, search



Pointer2.png TDAppTools add-on general info Pointer.png

Application add-on offering handy features for developers, testers, designers and service engineers.
Features to increase productivity in working with applications build with Team Developer.
TDAppTools is available for all TD versions, starting from TD 2.1 up to TD 7.2.


During development, testing and maintenance of any TD build application, technical details about
the application internals is highly needed.
Developers, for instance, use Team Developer IDE debugging features to inspect the inner workings while creating
applications. By adding debug code, like tracing information to files, extra custom information about what
is going on in the application can be put to use to quickly spot errors or detect faulty data.
Placing messageboxes temporarily can show internal control data at specific points when executing a workflow.

Testers could need ways to extract data which is populated in GUI objects to validate if the data is correct.
Also reading the error logs or inspect trace info are very helpful to ensure the application is not encountering errors
which are not clearly visible for the end-user.

Service engineers who are on site at a production environment could encounter issues which should be reported back.
With more detailed information about the current state of the application and the system which it is running on, development teams
can work more efficiently to find and eventually fix defects.

To enable this, the developer has to add custom code to access these internals throughout the code.
And every project needs it, some way or the other.

Personally, as developer, I created many debugging features within my projects and copied handy custom tools and code from project
to project. In the end all those work was spread around projects and implementing them in new projects takes time to tailor them
to fit into those projects. This gave me the idea to implement a ready-to-go toolset which can easily be added to any application.
This toolset should be not included as source-code within projects. Including large amounts of code would enlarge the size of the project
and could potentially interfere with existing code and have an effect on the inner workings of applications.

So, TDAppTools add-on is meant to be packaged features in physical separated files which would not harm existing code.
The only elements added to project source-code is calling the needed interface of the add-on to start specific features.

TDAppTools available features

As TDAppTools is a personal project and mainly developed in spare free time it is not feasible to introduce all wanted tools at the start.
Those features should be compatible with most TD versions and offer generic functionality to be used in any project.

Therefore I chose to introduce features one at a time for each major release.

The first tool in TDAppTools v1.0 will be the Gui Inspector, which is a very valuable addition to any project.
The second mayor release, TDAppTools v2.0 contains Sql Monitor, a tool to inspect Sql actions performed by your application in real-time. Version 2.3 adds the Profiler Controller to start/stop profiling which is introduced in TD 7.2.

Later on, other features will be added in subsequent versions.

Pointer2.png TDAppTools version history Pointer.png

Version history for TDAppTools

Current version: 2.3

Version 2.3	30-10-2019	Dave Rabelink

   # General
	- New: TD 7.2 version support
	- New: Added start screen or popup menu to open the several tools from one location (incl API)
	- New: About screen. Button for TD community forum
	- Change: Exports will use a unique filename using counters when file already present
	- Change: All tools saving GUI options is now enabled by default
	- Change: About screen. URL changed to https and tdcommunity. Direct donate link
   # Gui Inspector
	- New: Tool to send/post messages to objects. Pick messages from fixed list (SAM and WM) or use custom messages
	- New: Set objects TOPMOST/NOTOPMOST from the actions/z-order menu
	- New: Set state of window (maximized, normal, minimized) from new Window state menu
	- Change: TD themes screen, added Office 2016 theme (TD72 and up)
	- Change: Added missing CDK attribute strings up until TD72
	- Change: All Gui Inspector windows remember their screen locations
	- Change: Window tree view shows now all missing icon for known TD objects
	- Change: Now uses windows fontpicker instead of the Sal one to correctly preselect fonts
   # TD Profiling controller
	- Initial release. Only available for TD 7.2 and up

Version 2.2	13-01-2017

   # General
	- New: About screen. Buttons linked to YouTube, TDWiki and TD Samples
	- Fixed: check runtime dll function now reloads dll when not found using full path
   # Sql Monitor
	- New: support for ODBSal API functions OdrPrepareProc, OdrExecuteProc, OdrGetNextResults and OdrPrepareNextResults
	- New: support for SqlPrepareSP, SqlGetNextSPResultset, SqlCloseAllSPResultSets and SqlDropStoredCmd
	- New: options screen, About button
	- Change: API attached functions list is now sorted
	- Change: number values are now shown using the actual decimals (eg 1,05 or 234,32345 or 2)
   # Gui Inspector
	- New: options screen, About button
	- New: options screen, checkbox to enable/disable DWM feature for better bounding rectange display
	- Change: column values in attributes and properties window can be selected (read only) (for copy to clipboard)
	- Fixed: SAL attribute screen repopulate issue when mode Keep bounds was enabled
	- Fixed: Now using DWM instead of GetWindowRect to paint bound rectangle top level objects (when API is present)
	- Fixed: TD51-TD63 -> TabPage and NavBarPage template names are now correcty determined (TD70 and up is ok)

Version 2.1	17-10-2016

   # General
	- Now fully compatible with TD 7.0 (x86)

   # Gui Inspector
	- New: Monitor messages (experimental)
        - Minor fixes
   # Sql Monitor
        - New: Break in source
        - Changed: attaching to API is now faster and more stable

Version 2.0	23-09-2016

   # Gui Inspector
	- New: TD Themes selector. Change TD theme on the fly.
        - Changed: Item name (qualified display) will show > for owner and . for parent relationships
        - Changed: Text export will open registered application for txt files (it was always using notepad)
        - Changed: HTML export will escape newlines now
   # Sql Monitor
        - New: Initial version introducing Sql Monitor

Version 1.0	25-06-2015
   # Initial version introducing Gui Inspector

Pointer2.png TDAppTools Gui Inspector Pointer.png

This tool is Spy++ with a TD flavor.

It is used like other GUI spy tools, but the Gui Inspector has the advantage that it shows specific TD information other generic spy tools do not offer.
With the well known object selection tool, Gui objects can easily be identified on screen.
All information of the object is fetched in real-time and shows SAL details which will benefit anyone wanting to get more detailed information of the Gui internals.

List of features:

  • Available for all TD versions, starting from TD 2.1
  • Easy select objects using drag and point principle
  • Show SAL object details like: class name, template name, SAL attributes and properties
  • Full qualification of objects to show parent/child relationship using template names
  • Shows in which process, dynalib (apd) or library (apl) the object is defined
  • View and change object values or titles/captions
  • View and change object position and sizes in real-time
  • Drag objects around the screen to redesign a GUI
  • View and change fonts of objects
  • View and change object background and text colors
  • Inspect the window hierarchy using a tree view (for one process or all processes in the system)
  • Export data from tables, listboxes, comboboxes, listviews etc
  • View and change Windows Styles
  • View Windows properties
  • Class Browser: inspect the complete class hierarchy of an object
  • Locate process folder, show process details dialog, terminate process
  • Find objects based on window handle (Hex and Dec format)
  • Create screen-shots (to clipboard or to file)
  • Change the state and visibility of objects (enabled/disabled/hidden/visible)
  • Locate and select the object in the source-code when running from Team Developer IDE
  • Locate and select classes from the Class Browser in the source-code when running from Team Developer IDE
  • Print objects to IDE output window for easy select within TD
  • Search for Gui objects having a specific class name, template name, window handle, type or value/title
  • v2.1: Message monitor to inspect SAM/VT/WM and USR messages on TD objects (experimental)
  • v2.3: Send fixed or custom messages to any object
  • v2.3: Support for Window states (maximized, normal, minimized) and TopMost/NoTopMost

Gui Inspector Overview1.png

Instead of creating a complete manual of Gui Inspector, demo videos have been created to demonstrate the features and how to integrate it in your own projects.

You can find the videos on the TDWiki YouTube Channel, playlist TDAppTools here:

Video.png TDAppTools PlayList

Video.png TDAppTools - Gui Inspector Demo

TDAppTools can be downloaded from TD Sample Vault here:

Web.png TDAppTools

For questions, ideas and issues please contact me at:

Email : Dave Rabelink

TDAppTools is a personal project, developed in free spare time.
So, if you like the tools, please consider a donation to support this development.
You can find the DONATE button here on the TDWiki in the toolbar at the left.

Pointer2.png TDAppTools Sql Monitor Pointer.png

Using Sql Monitor you can trace database actions performed by your application in real-time.
This is without having to enable logging (SQL.INI) or having to change the setup of your system in any way.

Just start the main trace window of Sql Monitor and it will detect when your application calls Sql functions.
These actions are displayed in the trace window and statement log.

List of features:

  • Detects calling of a set of predefined Sql functions from the current running application (eg SqlConnect, SqlPrepare, SqlFetchNext etc).
  • Works on any database brand (eg Oracle, SqlBase, DB2 etc) as long as the supported Sql functions are called from the application.
  • Enable and disable monitoring on-the-fly.
  • Shows the original sql statement executed.
  • Shows details on actions, like the parameter values of the sql function being called.
  • Inspecting result sets. Display the values of bind variables for each fetched record.
  • Exporting trace and result sets (records) to text, Excel (csv) and HTML.
  • Shows the actual time spend to execute the actions (measured on API level, so no extra noice of business logic etc).
  • Search for specific statements containing particular texts (like names for tables, columns, variables etc).
  • Search for specific records within result sets having a particular value for bind variables.
  • Pretty printed SQL statement using color coding.
  • Inspect fetched (string) buffers as-is or in HEX view. Also conversion options from UNICODE<->ANSI.
  • Break modes to halt execution when particular conditions are met. Application will wait.
  • Inspect sql statements, input bind variables BEFORE they are executed/send to the database (in breakmode).
  • Inspect output bind variables AFTER they are fetched from DB but before the application is about to process them (in breakmode).
  • Change the sql statement and/or input bind variable values BEFORE action is executed on database on-the-fly (in breakmode).
  • Change output bind variable values AFTER they are fetched from DB (in breakmode).
  • Change string (buffer) values by loading them from a file (in breakmode)
  • Save string (buffer) to file on disk.
  • v2.1: Break in source, to break at the source code line where SQL action is executed.

SqlMonitor ResultsetViewer.png

You can find the video on the TDWiki YouTube Channel here:

Video.png TDAppTools - Sql Monitor Demo

TDAppTools can be downloaded from TD Sample Vault here:

Web.png TDAppTools

For questions, ideas and issues please contact me at:

Email : Dave Rabelink

TDAppTools is a personal project, developed in free spare time.
So, if you like the tools, please consider a donation to support this development.
You can find the DONATE button here on the TDWiki in the toolbar at the left.

Pointer2.png TDAppTools Profiler Controller Pointer.png

With TD 7.2 a new feature is introduced: profiling

TDAppTools Profiler Controller is a simple screen having options to define and control the profiling.
You can easily start a profiling session at any moment.

List of features:

  • Only available for TD 7.2 and up
  • Define the trace file
  • Define the level (1 or 2)
  • Start, suspend, continue and stop profiling
  • View the trace file using the TD Profiling Viewer
  • View the trace file using the windows default application for the file extension

TDAppTools ProfilerController.png