rufus
Active member
I written a code in button click event as
Dim grph As System.Drawing.Graphics
Try
Dim pen As Pen
pen = New Pen(Color:=Color.Blue, Width:=1)
grph.DrawLine(pen, 10, 10, 10, 10)
Catch ex As Exception
MsgBox(ex.ToString, MsgBoxStyle.OKCancel)
End Try
when Iam running,its giving error as
Object reference not set to an instance of object.
at grph.DrawLine(pen, 10, 10, 10, 10)
can any one can help.
Dim grph As System.Drawing.Graphics
Try
Dim pen As Pen
pen = New Pen(Color:=Color.Blue, Width:=1)
grph.DrawLine(pen, 10, 10, 10, 10)
Catch ex As Exception
MsgBox(ex.ToString, MsgBoxStyle.OKCancel)
End Try
when Iam running,its giving error as
Object reference not set to an instance of object.
at grph.DrawLine(pen, 10, 10, 10, 10)
can any one can help.