110,571
社区成员
发帖
与我相关
我的任务
分享
private void SetRadioButtonRgn() {
IntPtr hRgn = Win32.CreateRoundRectRgn(0, 1, radioButton1.Height, radioButton1.Height + 1, radioButton1.Height, radioButton1.Height);
//for (int i = 1; i <= 6; i++) {
// MessageBox.Show(this.Controls["radioButton" + i].Handle.ToString());
// Win32.SetWindowRgn(this.Controls["radioButton" + i].Handle, hRgn, true);
// //System.Threading.Thread.Sleep(500);
//}
//for (int i = 0; i < this.Controls.Count; i++) {
// if(this.Controls[i] is RadioButton)
// Win32.SetWindowRgn(this.Controls[i].Handle, hRgn, true);
//}
Win32.SetWindowRgn(this.Controls["radioButton1"].Handle, hRgn, true);
Win32.SetWindowRgn(this.Controls["radioButton2"].Handle, hRgn, true);
}