Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Visual Basic > VB 2015 > Beginning Visual Basic 2015
Password Reminder
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
Beginning Visual Basic 2015
This is the forum to discuss the Wrox book Beginning Visual Basic 2015 by Bryan Newsome; ISBN: 978-1-119-09211-7
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Beginning Visual Basic 2015 section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old June 29th, 2018, 05:35 AM
Registered User
Points: 13, Level: 1
Points: 13, Level: 1 Points: 13, Level: 1 Points: 13, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
Join Date: May 2018
Posts: 3
Thanks: 1
Thanked 0 Times in 0 Posts
Default ColorDialog1.ShowDialog

I am having a problem with Chapter 7 Windows Forms Dialogs Code. I have copied the code from the Book

Private Sub btnColor_Click(sender As Object, e As EventArgs) Handles btnColor.Click
'Show The Color Dialog And If The User Clicks The Ok Button
'Update The Background Color Of The Form

If ColorDialog1.ShowDialog = System.Windows.Forms.DialogResult.OK Then
Me.BackColor = ColorDialog1.Color
End If
End Sub

and ColorDialog1 is underlined in red and an error code BC30451 is generated with the message ColorDialog1 is not declared. It may be inaccessible due to its protection level. I have even copied and pasted the code from the downloaded examples and still get the same.

Can someone please help as I can't see what is wrong.

Many Thanks.

Last edited by Harrycat310; June 29th, 2018 at 06:53 AM..
Reply With Quote

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
showDialog(O); agplacid BOOK: Beginning Android 4 Application Development 0 October 21st, 2013 02:15 PM
Chapter2 - Showdialog mixieh BOOK: Beginning Android 4 Application Development 4 March 17th, 2013 02:25 PM
problem with ShowDialog() mori .NET Framework 2.0 0 August 21st, 2008 07:19 AM
Problem with form.ShowDialog() karveajit C# 1 October 6th, 2007 04:35 PM
Showdialog Help!!! KL VS.NET 2002/2003 1 December 15th, 2003 05:22 PM

All times are GMT -4. The time now is 07:46 PM.

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