0

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

Border edges isnt smooth

image

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

How can i make it smooth?

Thanks in advance

4
Contributors
7
Replies
8
Views
5 Years
Discussion Span
Last Post by nesa24casa
0

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 by ChrisHunter

0

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

0

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.

1

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

    // Set the SmoothingMode property to smooth the line.
    e.Graphics.SmoothingMode = 
        System.Drawing.Drawing2D.SmoothingMode.AntiAlias;
0

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 topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.