Bitmap bit= new Bitmap(@"" + Path);//给图片加边框 //Bitmap bit = new Bitmap(Screen.AllScreens[0].Bounds.Size.Width, Screen.AllScreens[0].Bounds.Size.Height);//给当前桌面图加边框 float w = (float)(bit.Width * 0.2);//边框的宽度,可取任意值 using (Graphics g = Graphics.From
C# WinForm窗体控件Panel修改边框颜色以及边框宽度方法 1.新建组件这里可以自定义一个Panel控件起名为PanelEx 2.增加一个BoderColor属性和BoderSize属性 private Color _BorderColor = Color.Black; [Browsable(true), Description("边框颜色"), Category("自定义分组")] public Color BorderColor { get { retu