Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Visual Basic > VB 2005 > BOOK: Beginning Visual Basic 2005 ISBN: 978-0-7645-7401-6
| Search | Today's Posts | Mark Forums Read
BOOK: Beginning Visual Basic 2005 ISBN: 978-0-7645-7401-6
This is the forum to discuss the Wrox book Beginning Visual Basic 2005 by Thearon Willis, Bryan Newsome; ISBN: 9780764574016
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning Visual Basic 2005 ISBN: 978-0-7645-7401-6 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
  #1 (permalink)  
Old July 12th, 2009, 05:25 AM
Authorized User
Join Date: Jun 2009
Posts: 18
Thanks: 0
Thanked 0 Times in 0 Posts
Default I want to know this chapter 14, is someone can give me those answers???

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.
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
If objGraphicsItem IsNotNothingThen        ------------------------  (Error)

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

  #2 (permalink)  
Old July 12th, 2009, 01:09 PM
Wrox Author
Points: 333, Level: 6
Points: 333, Level: 6 Points: 333, Level: 6 Points: 333, Level: 6
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
Join Date: Mar 2006
Location: , , .
Posts: 91
Thanks: 0
Thanked 5 Times in 5 Posts

Grace, this is just a warning. It just lets you know that if you do not set that object before this code it will fail. You could reorder the code to remove the warning but you can just ignore it since the object is set prior to the warning. Bryan

Similar Threads
Thread Thread Starter Forum Replies Last Post
answers to questions at end of chapter lewid C# 2005 0 September 12th, 2006 09:06 AM
Chapter 14 JonG BOOK: Beginning Visual Basic 2005 Databases ISBN: 978-0-7645-8894-5 1 March 21st, 2006 10:04 PM
Chapter 14 Mike Smith BOOK: Professional C#, 2nd and 3rd Editions 2 January 4th, 2004 05:13 PM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.