Using a TouchscreenCognex VisionPro 9.25 SR1

VisionPro provides a mechanism to modify the size of interactive graphic handles, primarily for use on touch screen devices.

Modify the VisionPro.ini file Display Settings

VisionPro provides a mechanism to modify the size of interactive graphic handles, primarily for use on touch screen devices. Within the VisionPro.ini file, the Display Settings section contains an entry for setting the default size of all interactive graphic handles. The DefaultGraphicHandleSize setting controls the default size of all of the interactive graphic handles, for all VisionPro applications on a PC. Modifying this setting in the VisionPro.ini file allows you to change the size of the hanles in your application without having to write code or adding this setting to your VPP files (though there is an option to do so, which is described below). The default setting in the VisionPro.ini file is 8 pixels, and cannot be set to a value smaller than 8 (if a value smaller than 8 is set, it will be ignored and the original default size of 8 will be used, instead). There is not a maximum size setting, though, due to the limitations of most touch screens sizes, a reasonable size should be set. The graphics handles size is an integer value, though hex formatting (e.g. 0x010) may be used.

Overriding the VisionPro.ini file Display Settings Through the API

The VisionPro.ini file DefaultGraphicHandleSize setting may be overriden in your Visual Studio.NET applications,by using the GetDefaultGraphicHandleSize method and SetDefaultGraphicHandleSize method of CogMisc. Changing this setting establishes a new default size for interactive graphic handles within the application. Interactive graphics do not serialize or persist their handles, which means that the size of the graphics handles is not persisted when a graphic is serialized to, and later loaded from, a VPP file.

Note: The interactive graphic handles are created when they are first needed, which is typically when they are displayed for the first time. Changing the global setting will not change the size of graphic handles which have already been created; the new default setting only applies to new graphics which have not yet had their handles created.

The following figure shows the default and enlarged interactive graphic handles sizes:

Display Graphics Walkthrough TouchScreen IGH Sizes