QUOTE(the_hangman @ 5 Dec, 2006 - 02:32 PM)

I havent tested this, but you can try it. Instead of
mywidth = CmbWidth.SelectedIndex + 1 try
drawpen.Width = CmbWidth.SelectedIndex + 1Also, if you are going to perform an action that is exactly the same in every outcome, there is no real need to type it more than once. Save space and just do it once
CODE
Private Sub Picbox_MouseUp(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles Picbox.MouseUp
x2 = MousePosition.X - Me.Left - Picbox.Left
y2 = MousePosition.Y - Me.Left - Picbox.Left
drawpen.Width = CmbWidth.SelectedIndex + 1
drawgraphics.SmoothingMode = Drawing2D.SmoothingMode.None
If drawtool = "Line" Then
drawgraphics.DrawLine(drawpen, x1, y1, x2, y2)
ElseIf drawtool = "Rectangle" Then
drawgraphics.DrawRectangle(drawpen, x1, y1, x2, y2)
ElseIf drawtool = "Freehand" Then
drawgraphics.DrawLine(drawpen, x1, y1, x2, y2)
End If
Picbox.Image = drawbitmap
'Stop drawing.
drawing = False
End Sub
I got this to work by making a widepen = mycolor,mysize. I changed the way I did the colors from pens.black to color.black, for example. Then I changed drawpen in the code to widepen. I got this done last night and didn't see your post until this morning. May not be the best way to "get the job done" but it works. I will now make the change the way I entered the code toimplement your latest recommendation. Thanks so much!!
CODE
widepen = mycolor,mysize
If drawtool = "Line" Then
drawgraphics.DrawLine(widepen, x1, y1, x2, y2)
ElseIf drawtool = "Rectangle" Then
drawgraphics.DrawRectangle(widepen, x1, y1, x2, y2)
ElseIf drawtool = "Freehand" Then
drawgraphics.DrawLine(widepen, x1, y1, x2, y2)
End If