Files
2026-06-11 15:17:50 +08:00

21 lines
526 B
C#

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace Work.Helper
{
public class WindowStyle
{
public static void SetFormRoundRectRgn(Control c, int rgnRadius)
{
int hRgn = 0;
hRgn = Win32.CreateRoundRectRgn(0, 0, c.Width + 1, c.Height + 1, rgnRadius, rgnRadius);
Win32.SetWindowRgn(c.Handle, hRgn, true);
Win32.DeleteObject(hRgn);
}
}
}