AntiAliased Form

G

Guest

Hi All
i had made a borderless and shaped window using this code

public Form1()
{
this.FormBorderStyle=FormBorderStyle.None;
}
protected override void OnPaint(PaintEventArgs e)
{
e.Graphics.SmoothingMode=SmoothingMode.AntiAlias;
GraphicsPath GP=new GraphicsPath();
//Codeing to get any shape
this.Region=new Region(GP);
}

it works but i got a problem there is some pixilation on the borders which
looks very bad
is there any way to make AntiAliasing between the Form and the screen?

thx all
 
J

Jani Järvinen [MVP]

JCYE&S,
i had made a borderless and shaped window
it works but i got a problem there is some pixilation
on the borders which looks very bad is there any
way to make AntiAliasing between the Form and the screen?

I don't think Windows supports such a feature. You can in fact draw to the
screen and in that way it might be possible to anti-alias the window border,
but I wouldn't venture that far. It is better to leave this part of window
management to the operating system.

Think it this way: you own only the area your window contains, not more or
less.

--
Regards,

Mr. Jani Järvinen
C# MVP
Helsinki, Finland
(e-mail address removed)
http://www.saunalahti.fi/janij/
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top