Can anyone please tell me how to draw rectangle in paint using UiPath

I tried to draw straight line in paint using UiPath.
Now I want to draw a rectangle in paint using UiPath. Please share your ideas.
Thank you.

You can try recording a macro as you draw a rectangle. And then you might have to tune that recording to make it reusable.

Or you can use the System.Drawing namespace to create a drawing.

In this case you might want to supply the (x,y) coordinates and some more information that the Robot would need to draw the rectangle.

I remember watching a video by “Quality Assurance Labs” on youtube. I’m sure you can find their Paint Demo.