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, left As Long, top As Long, right As Long, bottom As Long, UnitMode As DeviceUnitModeConstants)
[Visual C++]     [ BOOL = ]imagekitcontrolname.GetPrintDraw().DrawFocusRect(long hDC, long left, long top, long right, long bottom, long UnitMode)

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)

In Visual Basic 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.

 

The ImageKit8 ActiveX is a product created by Newtone Corporation