This method draws a rounded rectangle in the designated object (screen, printer, image data).
Parameters
Name | Explanation |
---|---|
DeviceValue | The device context or the raster image data (i.e. Hdc or ImageHandle) depending on the DeviceMode |
left,top | The x and y coordinates for the top left corner of the rounded rectangle |
right,bottom | The x and y coordinates for the bottom right corner of the rounded rectangle |
x,y | The height and width of the arc used to round the rectangles corners |
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 |
In Visual Basic 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 RoundRect method draws a rounded rectangle in the designated object (screen, printer, image data). The left, top, right, and bottom parameters define the coordinates specifying the rounded rectangle. The corners of the rounded rectangle are rounded according to the arc defined in the x and y parameters. The outline of the rounded rectangle is drawn from the value set in the PenStyle property and the rounded rectangle is filled by the value set in the BrushStyle property. When drawing a rounded rectangle, it is recommended that the PenWidth, PenMode, PenColor, BrushColor, Transparent, and BackColor properties also be set. The BackColor property is enabled when the Transparent property is False and the the pen is not solid or the brush is hatch pattern.
If the DeviceMode parameter is 0 or2 then left, top, right, bottom, x and y parameters are in pixel units.
If the DeviceMode parameter is 1 then left, top, right, bottom, x and y parameters are in 0.1mm units.