Wrox Programmer Forums
|
BOOK: Professional VB.NET, 2nd Edition or 2003
This is the forum to discuss the Wrox book Professional VB.NET, 2nd Edition by Fred Barwell, Richard Case, Bill Forgey, Billy Hollis, Tim McCarthy, Jonathan Pinnock, Richard Blair, Jonathan Crossland, Whitney Hankison, Rockford Lhotka, Jan D. Narkiewicz, Rama Ramachandran, Matthew Reynolds, John Roth, Bill Sheldon, Bill Sempf; ISBN: 9780764544002
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Professional VB.NET, 2nd Edition or 2003 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
 
Old January 29th, 2005, 05:20 PM
Registered User
 
Join Date: Jan 2005
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default Chapter 13 receiving error

Private Sub LimitedCheckedListBox_ItemCheck(ByVal sender As Object, ByVal e As System.Windows.Forms.ItemCheckEventArgs) Handles MyBase.ItemCheck

        If (Me.CheckedItems.Count >= mnMaxSelectedItems) _
            And (e.NewValue - CheckState.Checked) Then
            RaiseEvent MaxItemsExceeded(mnMaxSelectedItems)

-----> shows the comparison of Me.CheckedItems.Count with nmMaxSelectedItems as an error: "Option Strict On disallows implicit conversions from 'Boolean' to 'Integer'.

What gives?


 
Old January 29th, 2005, 05:47 PM
Registered User
 
Join Date: Jan 2005
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Never mind. I see in the statement (e.NewValue - CheckState.Checked) should be an = sign.

Programmer going blind...

Although I did get the same implicit conversion problem on p.448

'Finally, set the default value to a variable to use
nHoldDefault = myAttribute.Value

since nHoldDefault is an Integer and myAttribute.Value is System.object

Cleared it up with CInt, but doesn't indicate that in the book.







Similar Threads
Thread Thread Starter Forum Replies Last Post
LINQ Error ? Chapter 13 workidoo BOOK: Beginning ASP.NET 3.5 : in C# and VB BOOK ISBN: 978-0-470-18759-3 3 July 22nd, 2008 09:37 AM
Chapter 13: Error in user.php pherank BOOK: Beginning PHP, Apache, MySQL Web Development ISBN: 978-0-7645-5744-6 0 July 4th, 2008 09:09 PM





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