VB的PICTUREBOX中的LINE函数画出的线用什么函数删除?拜托各位了 3Q
展开全部
自己用GDI+画的 无论什么什么尺寸的picturebox都行 <br>不过别太小了o(∩_∩)o<br>代码放在哪里自己决定啊<br>最好是放在 picturebox的resize时间里<br>每次picturebox大小改变都重画一次坐标<br><br>Dim b As New Bitmap(PictureBox1.Width, PictureBox1.Height)<br> Dim g As Graphics = Graphics.FromImage(b)<br> g.Clear(Color.White)<br> Dim p As New Pen(Color.Black)<br> p.EndCap = Drawing2D.LineCap.ArrowAnchor<br> g.DrawLine(p, 30, PictureBox1.Height - 30, 30, 30)<br> g.DrawLine(p, 30, PictureBox1.Height - 30, PictureBox1.Width - 30, PictureBox1.Height - 30)<br> Dim i As Integer<br> Dim bs As New SolidBrush(Color.Green)<br> Dim po As New Point<br> po.X = 0<br> po.Y = PictureBox1.Height - 35<br> For i = 700 To 1000 Step 50<br> g.DrawString(i, Me.Font, bs, po.X, po.Y)<br> g.DrawLine(p, po.X + 28, po.Y + 5, po.X + 30, po.Y + 5)<br> po.Y -= (PictureBox1.Height - 100) / 6<br> Next<br> po.X = 30<br> po.Y = PictureBox1.Height - 30<br> For i = 0 To 40 Step 5<br> g.DrawString(i, Me.Font, bs, po.X, po.Y + 5)<br> g.DrawLine(p, po.X, po.Y + 2, po.X, po.Y)<br> po.X += (PictureBox1.Width - 100) / 8<br> Next<br> PictureBox1.Image = b
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询