C#界面画虚线且无

 private void labelbar11_Paint(object sender, PaintEventArgs e)
        {
            Pen pen1 = new Pen(Color.Black, 3);
            pen1.DashStyle = System.Drawing.Drawing2D.DashStyle.Dash;
            pen1.DashPattern = new float[] { 4f, 2f };
            e.Graphics.DrawRectangle(pen1, 0, 0, this.panel1.Width - 1, this.panel1.Height - 1);

        }

 

posted on 2018-12-19 10:07  AlexGui  阅读(2307)  评论(0编辑  收藏  举报

导航