i have created borderless form with transparent png as bacground image but i have issue.

Border edges isnt smooth


Its like in this picture on the left and i need it to be smooth.

How can i make it smooth?

Thanks in advance

As Momerath said, use a higher resolution image, the reason the image isn't smooth is because there aren't enough pixels per-inch. After all a dish is only as good as its ingredients...

Edited 4 Years Ago by ChrisHunter

example image

i have tryied with higher DPI also but no luck
corners are just not smooth as in image
can i somehow add shadow or something

Are they smoother at all ? make it as high res as possible.

You could try editing it yourself in Adobe or and an application like that to ensure its precise.

You can draw a border by setting the SmoothingMode as AntiAlias.

    // Set the SmoothingMode property to smooth the line.
    e.Graphics.SmoothingMode = 

i did try that and

private void Form1_Paint(object sender, PaintEventArgs e)
e.Graphics.SmoothingMode = System.Drawing.Drawing2D.SmoothingMode.AntiAlias;
e.Graphics.CompositingQuality = System.Drawing.Drawing2D.CompositingQuality.HighQuality;

but no luck

This article has been dead for over six months. Start a new discussion instead.