Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
BOOK: Beginning Object-Oriented Programming with C#
This is the forum to discuss the Wrox book Beginning Object-Oriented Programming with C# by Jack Purdum; ISBN: 978-1-1183-3692-2
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning Object-Oriented Programming with C# 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 Display Modes
  #1 (permalink)  
Old January 14th, 2013, 01:22 PM
Registered User
Points: 27, Level: 1
Points: 27, Level: 1 Points: 27, Level: 1 Points: 27, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jan 2013
Posts: 5
Thanks: 1
Thanked 0 Times in 0 Posts
Default Chapter 2 Program 2

Hello,

In the second Try it Out for Chapter 2 (program 02) the steps say the following:

Quote:
Use the same File -> New Project -> Visual C# -> Windows menu sequence discussed earlier in this chapter (refer to Figure 2-8).
Do we complete the full sequence sequence from step 1 through 10, including deleting the code in step 7 on page 34 and adding the code in step 8?

I ask this because in step 8 of the first Try it Out, we add the using System; and using System.Windows.Forms; code, yet in the second try it out we are asked in step 2 to add the same program references to the project through the Reference Manager. Should we be stopping at step 7 and then continuing at step 2 of the second try it out?
  #2 (permalink)  
Old January 14th, 2013, 01:53 PM
Registered User
Points: 27, Level: 1
Points: 27, Level: 1 Points: 27, Level: 1 Points: 27, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jan 2013
Posts: 5
Thanks: 1
Thanked 0 Times in 0 Posts
Default

I believe I have figured this out.

Using the example from Chapter02Program01, you only go up to step 2 and then carry on at step 2 of Chapter02Program02 on page 45. However, it does not produce the frmMain.cs [Design] at the top of the source windows in step 3 which is fine because its just being deleted anyways in Step 6. No error or issue is presented.
  #3 (permalink)  
Old January 15th, 2013, 11:47 AM
Friend of Wrox
Points: 1,166, Level: 13
Points: 1,166, Level: 13 Points: 1,166, Level: 13 Points: 1,166, Level: 13
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Sep 2008
Location: Indianapolis, IN, USA.
Posts: 234
Thanks: 0
Thanked 32 Times in 30 Posts
Default Chapter 2 fix -- additional

The process detailed in Chapter 2, starting on page 32, is one that is done for virtually every program you write. Since some readers are having difficulty with this section, I have written a very detailed set of instructions for the directions that start on page 32. I am providing these instruction under a new Post.
__________________
Jack Purdum, Ph.D.
Author: Beginning C# 3.0: Introduction to Object Oriented Programming (and 14 other programming texts)
  #4 (permalink)  
Old April 11th, 2013, 11:51 AM
Registered User
Points: 15, Level: 1
Points: 15, Level: 1 Points: 15, Level: 1 Points: 15, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Apr 2013
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Quote:
Originally Posted by sapper View Post
I believe I have figured this out.

Using the example from Chapter02Program01, you only go up to step 2 and then carry on at step 2 of Chapter02Program02 on page 45. However, it does not produce the frmMain.cs [Design] at the top of the source windows in step 3 which is fine because its just being deleted anyways in Step 6. No error or issue is presented.
I'm having a hard time with this book. I too do not get the frmMain.cs [design], nor can't I get it by right clicking on the frmMain on solution window as it is not there.
All I get when following the book is "frmMain.cs" with empty code window.

What i'm supposed to do ?

Last edited by Brakkar; April 11th, 2013 at 11:57 AM.
  #5 (permalink)  
Old April 16th, 2013, 01:40 PM
Friend of Wrox
Points: 1,166, Level: 13
Points: 1,166, Level: 13 Points: 1,166, Level: 13 Points: 1,166, Level: 13
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Sep 2008
Location: Indianapolis, IN, USA.
Posts: 234
Thanks: 0
Thanked 32 Times in 30 Posts
Default What to do after you get an empty frmMain

Once you've cleared out the code that VS puts in frmMain, add the C# template code into the empty form:
Code:
using System;
using System.Windows.Forms;

public class frmMain:Form
{
#region Windows Code
	private void InitializeComponent()
	{
	}
#endregion

	public frmMain()
	{
		InitializeComponent();
	}

	[STAThread]
	public static void Main()
	{
		frmMain main = new frmMain();
		Application.Run(main);
	}
}
Let me know how this works for you...
__________________
Jack Purdum, Ph.D.
Author: Beginning C# 3.0: Introduction to Object Oriented Programming (and 14 other programming texts)
  #6 (permalink)  
Old April 18th, 2013, 11:05 AM
Registered User
Points: 15, Level: 1
Points: 15, Level: 1 Points: 15, Level: 1 Points: 15, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Apr 2013
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks, it works, i'm now on Chapter 5.
  #7 (permalink)  
Old April 18th, 2013, 11:09 AM
Registered User
Points: 15, Level: 1
Points: 15, Level: 1 Points: 15, Level: 1 Points: 15, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Apr 2013
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default

By the way, it seems I can't unzip the files of chapter 5 , because of an "unknown" method.

Can you please check if the files work for you ? Or provide alternate download ?
  #8 (permalink)  
Old April 21st, 2013, 01:34 PM
Friend of Wrox
Points: 1,166, Level: 13
Points: 1,166, Level: 13 Points: 1,166, Level: 13 Points: 1,166, Level: 13
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Sep 2008
Location: Indianapolis, IN, USA.
Posts: 234
Thanks: 0
Thanked 32 Times in 30 Posts
Default Unipping

Sometimes I have problems with zip files, too. If the Windows zip utility doesn't work, I usually try 7-zip, which is a free download at:

http://download.cnet.com/7-Zip/3000-...-10045185.html

Between the two, one usually does the job.
__________________
Jack Purdum, Ph.D.
Author: Beginning C# 3.0: Introduction to Object Oriented Programming (and 14 other programming texts)
  #9 (permalink)  
Old January 5th, 2014, 09:38 PM
Registered User
Points: 11, Level: 1
Points: 11, Level: 1 Points: 11, Level: 1 Points: 11, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jan 2014
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I have a different issue with this exercise. I have done some coding in other languages, looking to learn OOP, so moved up from C to this.

On page 36 at the bottom, we are discussing changing the TEXT property of the label object. Ok, cool, got that no problem.

But on page 37 in the 2nd paragraph we start addressing a TEXTBOX object and a BUTTON object.

It took a very, very long time to figure out that I needed to add those objects from the tool box. I did learn, and got the solution because I was reading all the code put in by Visual Studio upon adding an object. If you don't put in the texbox, the line of code:
"frmMain.ActiveForm.Text = textBox1.Text;"
causes a error on compile. Once the textbox is added the failure stops.

I do think I would have preferred to know we were adding those objects somewhere before you start talking about them.

That said, I like your teaching style and this is the second of your books I am working on.

Last edited by jack3M; January 5th, 2014 at 09:43 PM.
  #10 (permalink)  
Old January 5th, 2014, 10:31 PM
Friend of Wrox
Points: 1,166, Level: 13
Points: 1,166, Level: 13 Points: 1,166, Level: 13 Points: 1,166, Level: 13
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Sep 2008
Location: Indianapolis, IN, USA.
Posts: 234
Thanks: 0
Thanked 32 Times in 30 Posts
Default Chapter 2

Sorry for the confusion. This problem was discussed on an earlier thread and I just learned yesterday that no one at Wrox has updated the errata sheet according to those discussions. I've been told that will be fixed shortly. I'm glad that you were able to ferret out the problem yourself...always a good sign!

Thanks for the compliment on my teaching style...it's appreciated!
__________________
Jack Purdum, Ph.D.
Author: Beginning C# 3.0: Introduction to Object Oriented Programming (and 14 other programming texts)
 


Thread Tools
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
Chapter 2 - SampleUI program straycatsgp BOOK: Beginning iOS Game Development 9 March 23rd, 2013 10:12 AM
Chapter 2 Dialog Program cokebootle BOOK: Beginning Android Application Development 5 March 17th, 2012 09:25 AM
chapter 2 Mailing label program. Help! tobbeebbot BOOK: Beginning C# 3.0 : An Introduction to Object Oriented Programming ISBN: 978-0-470-26129-3 2 January 13th, 2012 08:06 AM
Chapter 2 - <Intents> program BrianMcK BOOK: Beginning Android Application Development 1 October 21st, 2011 09:31 AM
Chapter 6 : Message Contract Program Example thsun BOOK: Professional WCF Programming: .NET Dev with Windows Communication Found ISBN: 9780470089842 16 January 11th, 2008 11:34 AM



All times are GMT -4. The time now is 10:43 AM.


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