Wrox Programmer Forums
| 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 18th, 2006, 03:16 AM
Registered User
 
Join Date: Jul 2006
Location: , , New Zealand.
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default page 154 Begining Visual Basic 2005

I am having problems with the code on page 154. I have entered it 3 times now and get the same result.

Customer.vb
Error lstCustomer, not declared.

Form.vb
Error SelectedCustomer, not declared.
Error DialogResult.Yes, replace 'DialogResult'with 'windows.Forms.DialogResults'

I have also started from scratch and re-entered all the code 3 times as well with the same result, I have checked the spelling so many times that I have

  #2 (permalink)  
Old July 24th, 2006, 06:38 AM
Registered User
Points: 23, Level: 1
Points: 23, Level: 1 Points: 23, Level: 1 Points: 23, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jul 2006
Location: KL, WP, Malaysia.
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to LawrenceX
Default

Customer.vb:
I don't see any reference needed for the 'lstCustomer' textbox code. It's only used in Form.vb. Are you sure you didn't misplace some codes?

Form.vb: [u]Error SelectedCustomer, not declared</u>
You seem to have forgotten to input this code inside Form.vb:

    Public ReadOnly Property SelectedCustomer() As Customer
        Get
            If lstCustomers.SelectedIndex <> -1 Then
                'Return lstCustomers.Items(lstCustomers.SelectedIndex)
                Return objCustomers(lstCustomers.SelectedIndex)
            End If
        End Get
    End Property


[u]DialogResult.Yes</u>

It happens to me all the times, I think VS 2005 won't let it as compared to whatever IDE's version the author is using.
All you have to do is to replace [u]DialogResult.Yes</u> with [u]Windows.Forms.DialogResult.Yes</u>


  #3 (permalink)  
Old July 24th, 2006, 04:54 PM
Thearon's Avatar
Wrox Author
 
Join Date: Dec 2003
Location: Fuquay Varina, NC, USA.
Posts: 396
Thanks: 0
Thanked 8 Times in 8 Posts
Default

All,

The change from DialogResult.Yes to Windows.Forms.DialogResult.Yes happened between the last Community Technology Preview to the Final Release of the product. Please check the errata site for any last minute fixes to problems other readers may have come across.

Thearon


Similar Threads
Thread Thread Starter Forum Replies Last Post
Begining Visual basic 6 mrcoolcurrent Beginning VB 6 2 August 4th, 2008 10:14 AM
Visual Basic 2005 Express CForce Visual Basic 2005 Basics 1 June 22nd, 2008 10:21 PM
visual basic 2005 nidhigupta001 Visual Basic 2005 Basics 1 February 12th, 2007 08:26 AM
visual basic 2005 nidhigupta001 Visual Basic 2005 Basics 2 February 11th, 2007 04:06 PM
FTP in Visual Studio 2005 Pro (Visual Basic) shoopes VB How-To 1 June 29th, 2006 02:08 PM





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