Some times we want to draw rounded rectangles or show a form or controls with rounded corners. This class gives you that functionality. The class has two functions "RoundedRectangle" and "RoundedRegion". The "RoundedRectangle" rounds the corners of the rectangle and returns the graphics path. The "RoundedRegion" creates a rectangle-region, rounds the corners and returns the newly created region.
Class Shared Methods:
RoundedRectangle – Returns the graphics path of the rounded-rectangle (parameters: rectangle, radius and four optional parameters for each corner).
RoundedRegion – Returns a newly created region with rounded corners (parameters: region size, radius and four optional parameters for each corner).
Usage:
VB Code:
'Draw a rounded rectangle in the form's paint event.
Private Sub Form1_Paint(ByVal sender As Object, ByVal e As System.Windows.Forms.PaintEventArgs) Handles Me.Paint
How could you make all the form corners (me.region) rounded? When I Try the Shape.Corner.BottomRight & so on, it only makes the first two rounded. When I call two instances, it gives me an error.
How could you make all the form corners (me.region) rounded? When I Try the Shape.Corner.BottomRight & so on, it only makes the first two rounded. When I call two instances, it gives me an error.