I am trying to put a rectangular line around my picturebox but it comes out strange. What am I doing wrong in my code?
Code:
Private Sub Slider1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Slider1.Click
Dim objgraphics As Graphics
objgraphics = Slider1.CreateGraphics
objgraphics.DrawRectangle(System.Drawing.Pens.CadetBlue, _
Slider1.Left - 1, Slider1.Top - 1, _
Slider1.Width + 1, Slider1.Height + 1)
End Sub