You can see my previous questions on the Thread, I need the answers.
Also, there is a warning message, after I run this project on the page 435.
Code:
PublicSub DoMousePaint(ByVal e As MouseEventArgs)
Dim objGraphicsItem As GraphicsItem
SelectCase GraphicTool
Case GraphicTools.CirclePen
Dim objGraphicsCircle AsNew GraphicsCircle()
objGraphicsCircle.SetPoint(e.X, e.Y, GraphicSize, GraphicColor, True)
objGraphicsItem = objGraphicsCircle
EndSelect
If objGraphicsItem IsNotNothingThen ------------------------ (Error)
GraphicsItems.Add(objGraphicsItem)
Me.Invalidate(objGraphicsItem.Rectangle)
EndIf
EndSub
Error message:
Warning 3 Variable 'objGraphicsItem' is used before it has been assigned a value. A null reference exception could result at runtime. C:\Documents and Settings\GRACE\My Documents\Visual Studio 2005\Projects\WroxPaint\WroxPaint\PaintCanvas.vb 26 12 WroxPaint