Answer the question
In order to leave comments, you need to log in
How to make a shape from an image?
Good afternoon!
Can you please tell me how to make the outline of the application form based on the image?
That is, so that the shape is not rectangular or round, but would look like in the image?
For example, to draw a shape as an ellipse, the following code is used:
GraphicsPath path = new GraphicsPath();
path.AddEllipse(0, 0, this.Width, this.Height);
Region region = new Region(path);
this.Region = region;
Answer the question
In order to leave comments, you need to log in
Two eternal questions: how to put an icon in the tray and how to make a non-rectangular shape :)
About the shape... we did this:
* load the image into a Bitmap
* run through all the pixels, form an array of lines (more precisely, the coordinates of points)
* further GraphicsPath.AddLines (Point[])
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question