我有这个代码:
Sub drawborder()
Dim objGraphics As Graphics
objGraphics = Me.CreateGraphics
objGraphics.Clear(System.Drawing.SystemColors.Control)
objGraphics.DrawRectangle(System.Drawing.Pens.Red, picShowPicture.Left - 1, picShowPicture.Top - 1, picShowPicture.Width + 1, picShowPicture.Height + 1)
objGraphics.Dispose()
borderstatus.Text = "Border Drawn"
End Sub
这会在 PictureBox 周围绘制边框。现在我想使用另一个按钮再次删除它,但我似乎无法让它工作。