Smooth edges of non-rectangular form in .NET

前端 未结 2 1201
故里飘歌
故里飘歌 2021-01-18 03:31

I\'ve created a form with rounded corners using Form.Region. It works, but unfortunately the rounding appears rough. Are there any tricks for smoothing such shaped form corn

2条回答
  •  野趣味
    野趣味 (楼主)
    2021-01-18 03:55

    From what I've read online most people end up overriding the forms onpaint event and drawing the region there. This allows them to use GDI+ with antialiasing and make it look much cleaner.

    The examples I found:

    http://netcode.ru/dotnet/?lang=&katID=30&skatID=283&artID=7833 http://www.xtremevbtalk.com/showthread.php?t=288178

提交回复
热议问题