Wrox Programmer Forums
|
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 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 June 28th, 2018, 05:32 AM
Registered User
 
Join Date: May 2018
Posts: 3
Thanks: 1
Thanked 0 Times in 0 Posts
Default Chapter 7 MesageBox Buttons

I am having problems with Windows.Forms.DialogResult.OK. Windows.Forms is underlined in red and it tells me Forms is not a member of Windows. I have read and re-read all of the book up to chapter 7 retyped the code over and over again and even copied and pasted from the examples and still get the same result. I did find that if I copy and paste the file MessageBox Buttons.vbproj from the folder MessageBox Buttons From the examples downloaded then it works fine. Can You please help tell me what I am doing wrong.

Many Thanks
Harrycat310
 
Old July 4th, 2018, 04:30 PM
james_drag
Guest
 
Posts: n/a
Default VB

Your call to MessageBox.A show needs to pass MessageBoxButtons.YesNo to get the Yes/No buttons instead of the OK button.

Last edited by jminatel; July 9th, 2018 at 09:04 AM.. Reason: spam link
Received Infraction
The Following User Says Thank You to For This Useful Post:
Harrycat310 (July 5th, 2018)
 
Old August 12th, 2018, 12:44 PM
Registered User
 
Join Date: Aug 2018
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Ch 7 MessageBoxOptions

I ran into the same problem on chapter 7, page 214/215. The sample code would work fine, but the code would not work in the version I created, even though the code matched.

I solved it by making these changes...

Instead of MessageBoxButtons.OKCancel I changed it to...
System.Windows.Forms.MessageBoxButtons.OKCancel

And,
Instead of Windows.Forms.DialogResult.OK I changed it to...
System.Windows.Forms.DialogResult.OK

Polly





Similar Threads
Thread Thread Starter Forum Replies Last Post
Chapter 15, Toolbar buttons tqu BOOK: Ivor Horton's Beginning Visual C++ 2010 1 May 3rd, 2011 10:44 PM
Buttons plb BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0 4 August 12th, 2007 12:36 AM
buttons over and under rahzan Access VBA 4 April 7th, 2005 11:35 AM
'ok buttons' hiker Beginning VB 6 2 March 22nd, 2004 02:30 PM





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