←Select platform

HitTestState Property

Summary

Indicates this mode hit-test state.

Syntax

C#
VB
C++
public virtual bool HitTestState { get; set; } 
Public Overridable Property HitTestState() As Boolean 
   Get 
   Set 
public:  
   virtual property bool HitTestState 
   { 
      bool get() 
      void set(bool value) 
   } 

Property Value

true if this mode hit-test state is on, otherwise; false.

Remarks

HitTestState can be used to create an interactive mode that works over an area of interest in the viewer.

Example

Run the example. The cursor changes to a crosshair when it is over the red rectangles.

Start with the ImageViewer example, remove all the code inside the example function (search for the "// TODO: add example code here" comment) and insert the following code:

C#
VB
using Leadtools; 
using Leadtools.Controls; 
using Leadtools.Codecs; 
using Leadtools.Drawing; 
using LeadtoolsExamples.Common; 
using Leadtools.ImageProcessing; 
using Leadtools.ImageProcessing.Color; 
 
Cursor interactiveModeCursor = null; 
if (_imageViewer.HitTestStateInteractiveMode != null) 
{ 
   interactiveModeCursor = _imageViewer.HitTestStateInteractiveMode.HitTestStateCursor; 
} 
 
if (interactiveModeCursor != null) 
   _imageViewer.Cursor = interactiveModeCursor; 
Imports Leadtools 
Imports Leadtools.Controls 
Imports Leadtools.Codecs 
Imports Leadtools.Drawing 
Imports Leadtools.ImageProcessing 
Imports Leadtools.ImageProcessing.Color 
 
Dim interactiveModeCursor As Cursor = Nothing 
If Not _imageViewer.HitTestStateInteractiveMode Is Nothing Then 
   interactiveModeCursor = _imageViewer.HitTestStateInteractiveMode.HitTestStateCursor 
End If 
 
If Not interactiveModeCursor Is Nothing Then 
   _imageViewer.Cursor = interactiveModeCursor 
End If 

Requirements

Target Platforms

Help Version 19.0.2017.10.27
Products | Support | Contact Us | Copyright Notices
© 1991-2017 LEAD Technologies, Inc. All Rights Reserved.

Leadtools.Controls.WinForms Assembly