使用重画……或者重载onpaint();

解决方案 »

  1.   

    可以用  grfGraphics.Clear(Color.WhiteSmoke) 覆盖背景颜色 假设画布背景颜色 是WhiteSmoke
     
            Dim grfGraphics As Graphics = Picture1.CreateGraphics
            grfGraphics.Clear(Color.WhiteSmoke)
            grfGraphics.SmoothingMode = SmoothingMode.AntiAlias
            Dim pen2 As Pen = New Pen(Color.Blue, 1)
            pen2.DashStyle = DashStyle.Solid
            Dim fnt As Font
            fnt = New Font("Impact", 100, FontStyle.Bold)
            '画x坐标
            grfGraphics.DrawLine(pen2, Picture1.Width - 25, Picture1.Height - 25,   Picture1.Width - 1, Picture1.Height - 15)
      grfGraphics.DrawLine(pen2, Picture1.Width - 25, Picture1.Height - 5, Picture1.Width - 1, Picture1.Height - 15)
            grfGraphics.DrawLine(pen2, 0, Picture1.Height - 15, Picture1.Width - 1, Picture1.Height - 15)