Am a newbie when it comes to c#, I was wondering if it's possible to make a circular shaped pictureBox in c# winforms. I am making a simple Software where people could choose pictures and set it to a picturebox. So I can't ask every user to go on Photoshop and make their image circular. Is it possible to make a Circular pictureBox which Crop the picture and update the picture file which should be in PNG Format with transparent background?
My current code to set the image in the pictureBox1 on button1 Click Event:
private void button1_Click(object sender, EventArgs e)
{
OpenFileDialog OFD = new OpenFileDialog();
if (OFD.ShowDialog() == DialogResult.OK)
{
Bitmap Image = new Bitmap(OFD.FileName);
pictureBox1.Image = Image;
pictureBox1.SizeMode = PictureBoxSizeMode.Zoom;
}
}
I have no Idea on how I could do this or where to start searching! Some help will be grateful.