This method draws a rectangle in the style used to indicate that the rectangle has the focus.

[Visual Basic]   [ Boolean = ]imagekitcontrolname.PrintDraw.DrawFocusRect(hDC As LONG_PTR, left As Long, top As Long, right As Long, bottom As Long, UnitMode As DeviceUnitModeConstants)
[Visual C++]     [ BOOL = ]imagekitcontrolname.GetPrintDraw().DrawFocusRect(LONG_PTR hDC, long left, long top, long right, long bottom, long UnitMode)
[VB.NET]   [ Boolean = ]imagekitcontrolname.PrintDraw.DrawFocusRect(hDC As Integer(x86) or Long(x64), left As Integer, top As Integer, right As Integer, bottom As Integer, UnitMode As ImageKit10(A)Lib.DeviceUnitModeConstants)
[C#.NET]   [ bool = ]imagekitcontrolname.PrintDraw.DrawFocusRect(int(x8) or long(x64) hDC, int left, int top, int right, int bottom, ImageKit10(A)Lib.DeviceUnitModeConstants UnitMode)

* ImageKit10ALib refers to the ANSI version, ImageKit10Lib refers to the Unicode version, (x86) refers to the 32 bit version, and (x64) refers to the 64 bit version.

Parameters

Name Explanation
hDC The device context
left, top The x, y coordinates of the top left corner of the rectangle
right, bottom The x, y coordinates of the bottom right corner of the rectangle
UnitMode Sets the units for the left, top, right, and bottom parameters (0: units in pixel; 1: units in 0.1mm)

The following constants can be used: (ikPrinterPixel = 0, ikPrinterMM = 1).

Return Value

Returns True (nonzero) if successful. Returns False (0) if unsuccessful.

Explanation

The DrawFocusRect method draws a rectangle in the style used to indicate that the rectangle has the focus.

Because DrawFocusRect uses XOR function to draw the rectangle, calling it a second time with the same rectangle removes the rectangle from the screen.

This function draws a rectangle that cannot be scrolled. To scroll an area containing a rectangle drawn by this function, call DrawFocusRect to remove the rectangle from the screen, scroll the area, and then call DrawFocusRect again to draw the rectangle in the new position.

To draw the rectangle, the BrushStyle and BrushColor properties must be set.

If the UnitMode parameter is 0 (ikPrinterPixel) then the left, top, right, bottom parameters are in pixel units.

If the UnitMode parameter is 1 (ikPrinterMM) then the left, top, right, bottom parameters are in 0.1mm units.

Differences between the ImageKit7/8

The DeviceValue argument's type has changed.

The ImageKit10 ActiveX is a product created by Newtone Corporation