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

[C++Builder]   [ bool = ]imagekitcontrolname->PrintDraw->DrawFocusRect(HDC DC, int ALeft, int ATop, int ARight, int ABottom, TVIkDeviceUnitMode UnitMode)
[C++Builder]   [ bool = ]imagekitcontrolname->PrintDraw->DrawFocusRect(HDC DC, const TRect &ARect, TVIkDeviceUnitMode UnitMode)
[Delphi]   [ Boolean = ]imagekitcontrolname.PrintDraw.DrawFocusRect(DC: HDC; ALeft: Integer; ATop: Integer; ARight: Integer; ABottom: Integer; UnitMode: TVIkDeviceUnitMode)
[Delphi]   [ Boolean = ]imagekitcontrolname.PrintDraw.DrawFocusRect(DC: HDC; const ARect: TRect; UnitMode: TVIkDeviceUnitMode)

[TVIkDeviceUnitMode Type]

Unit
     IkInit

type
     TVIkDeviceUnitMode = (vikPrinterPixel, vikPrinterMM);

Parameters

Name Explanation
DC The device context
ALeft, ATop The x, y coordinates of the top left corner of the rectangle
ARight, ABottom The x, y coordinates of the bottom right corner of the rectangle
ARect The x, y coordinates of the rectangle
UnitMode Sets the units for the ALeft, ATop, ARight, and ABottom parameters (vikPrinterPixel: units in pixel; vikPrinterMM: units in 0.1mm)

Use either ALeft, ATop, ARight, ABottom or ARect.

Return Value

Returns True if successful. Returns False 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 vikPrinterPixel, then the ALeft, ATop, ARight, ABottom, (or ARect), X1, Y1, X2, Y2 parameters are in pixel units.

If the UnitMode parameter is vikPrinterMM, then the ALeft, ATop, ARight, ABottom, (or ARect), X1, Y1, X2, Y2 parameters are in 0.1mm units.

Differences between the ImageKit7/8/9/10

In VCL the constants contain a "v". In ActiveX, the constants are: ikScreen, ikPrinter, ikMemoryHandle.
Methods that pass a TRect type have been added.

The ImageKit10 VCL is a product created by Newtone Corporation