This method draws the border of the specified rectangle in the designated object.

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

* 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
DeviceValue The device context or the raster image data (i.e. Hdc or ImageHandle) depending on the DeviceMode parameter
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
DeviceMode If 0 (ikScreen), then the output will be drawn in pixel units. If 1 (ikPrinter), the output will be drawn in 0.1mm units. If 2 (ikMemoryHandle), the output will be drawn (in pixel units) to the image data according to the DeviceValue parameter

The following constants can be used: (ikScreen = 0, ikPrinter = 1, ikMemoryHandle = 2).

Return Value

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

Explanation

The FrameRect method draws the border of the specified rectangle in the designated object. The rectangle is specified by the left, top, right, and bottom parameters and drawn using the value of the BrushStyle property. The area inside the border of the rectangle will not be filled. (The designated object can be the screen, printer, or image data)

To use this method the BrushStyle, BrushColor, Transparent, and BackColor properties must be set. The BackColor property is enabled when the Transparent property is False and the hatch pattern brush is used. With the FrameRect method, when the Transparent property is True and a hatch pattern is selected, the spaces between the lines will be filled with the default color and will NOT be transparent. To make the space between the lines of the hatch pattern transparent, please use the Rectangle method instead.

If the DeviceMode parameter is 0 or 2 (the designated object is the screen or the image data) then the left, top, right, bottom parameters are in pixel units.

If the DeviceMode parameter is 1 (the designated object is the printer) then the left, top, right, bottom parameters are in 0.1mm units.

Differences between the ImageKit7/8

The DeviceValue argument type has changed.

The ImageKit10 ActiveX is a product created by Newtone Corporation