Freigeben über


Adding Window Size and Position Memory using the Support Debugging Tool

David Meego - Click for blog homepageAs a follow on to the article: Using Support Debugging Tool Non-Logging Triggers, I thought I would post a few small examples of how Non-Logging Triggers can be used for simple customizations.

There have been some other examples posted in the past on this and other blogs. If you are interested have a look at this post: Using the Support Debugging Tool with Real Life Examples.

This example demonstrates how to allow any window to remember its size and position. For this sample, I used the Purchase Order Entry window.

The method is in this example is the based on how the Support Debugging Tool itself keeps track of its own windows size and position and stores the data as a single line in the Dex.ini file. For example: 

MBS_Win_POP_PO_Entry_POP_PO_Entry=46,-37,664,456

Note: The position information is relative to the Microsoft Dynamics GP main application window and so can show negative figures when the window was last positioned higher than or left of the main window. 

The example uses two Trigger IDs:

  1. POP_ENTRY_POST
    This trigger captures the size and position information of the window just before it closes and writes this information into the Dex.ini as an MBS_Win* setting.
     
  2. POP_ENTRY_PRE
    This trigger reads the previously written Dex.ini setting and parses the line to size and position information. It then adjusts the window's size and position just before it is opened.

The Support Debugging Tool Debugger Settings file with these triggers is attached as an archive to the bottom of this post.

 

For some related window size and position posts, see the following articles:

Enjoy 

David

21-Aug-2012: See the updated version of the code at Update: Adding Window Size and Position Memory using the Support Debugging Tool. This update uses a table rather than the Dex.ini to store the settings.

09-Oct-2013: Added links to related articles.

Debugger Settings POP Entry Window Size.dbg.zip

Comments