Wrox Programmer Forums
|
BOOK: Beginning C# 3.0 : An Introduction to Object Oriented Programming ISBN: 978-0-470-26129-3
This is the forum to discuss the Wrox book Beginning C# 3.0 : An Introduction to Object Oriented Programming by Jack Purdum; ISBN: 9780470261293
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning C# 3.0 : An Introduction to Object Oriented Programming ISBN: 978-0-470-26129-3 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 28th, 2009, 12:04 AM
Registered User
 
Join Date: Jan 2009
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default cannot open project properties

On page 40 we are given instructions on how to set properties for the MailingLabel project. When I attempt to do so, I get an error:

An error occurred trying to load the page.
The system cannot find the file specified. (Exception from HRESULT: 0x80070002)

I'm a bit surprised nobody else has reported this problem because I cannot find anything I did wrong up to this point.

Can anybody provide guidance on how to resolve this issue?

Dan
 
Old January 31st, 2009, 08:38 PM
Friend of Wrox
 
Join Date: Sep 2008
Posts: 234
Thanks: 0
Thanked 32 Times in 30 Posts
Default

I'm in FL and don't have access to my code or book, but my guess is that you need to go back to the instructions for the sample program setup at the end of Chapter 1, after you installed VS, that tests the compiler's installation. You must follow those directions for all projects in the book, and they are NOT the default that VS uses.

Let me know if that fixes it.

Dr. Purdum
__________________
Jack Purdum, Ph.D.
Author: Beginning C# 3.0: Introduction to Object Oriented Programming (and 14 other programming texts)
 
Old February 1st, 2009, 12:32 AM
Registered User
 
Join Date: Jan 2009
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default still no go

Thanks for the guidance, but still I cannot get project properties to show from the Project menu.

When I look at the installation instructions in chapter one for VS, they are significantly different from the current state of VS. For one thing, the URL given in the textbook for the download is no longer valid. Also, the screen shot shown in the book for download choices (on p5) is no longer valid. Rather than download an IMG file, one is provided with a file called "vcssetup.exe". When this program is run, it prompts for user choices and downloads what it needs to download before installation. The only option it gave me was to download SQL server. (I don't remember which version.)

On page 7 of the textbook, the screenshot of the installation setup screen shows 3 options. As I said, I only saw one choice.

Also, the instructions for the sample program in chapter one - for testing the VS installation - use the "Windows Application" template. Starting with chapter two (on page 36) we are instructed to use the "Empty Project" template and then add three references and the Code File item. That's what I've been doing so far, and I'm in chapter 5 now.

BTW, I CAN write and run programs, but I cannot set project properties as instructed on pages 40 and 41 of the text. So, I cannot set the Output type to Windows Application, and I cannot set the Startup object to "frmMain".

When I run my programs, I get what appears to be a DOS box behind my program window - and this DOS box stays there until I exit my Windows program.

Perhaps I have TOO much installed. Here is a list of related programs I have installed:

Microsoft .NET Framework 3.5 SP1 3.5.30729
Microsoft SQL Server 2008 Browser 10.0.1600.22
Microsoft SQL Server 2008 Common Files 10.0.1600.22
Microsoft SQL Server 2008 Database Engine Services 10.0.1600.22
Microsoft SQL Server 2008 Database Engine Shared 10.0.1600.22
Microsoft SQL Server 2008 Management Objects 10.0.1600.22
Microsoft SQL Server 2008 Native Client 10.0.1600.22
Microsoft SQL Server 2008 RsFx Driver 10.0.1600.22
Microsoft SQL Server 2008 Setup Support Files (English) 10.0.1600.22
Microsoft SQL Server Compact 3.5 SP1 Design Tools English 3.5.5692.0
Microsoft SQL Server Compact 3.5 SP1 English 3.5.5692.0
Microsoft SQL Server VSS Writer 10.0.1600.22
Microsoft Visual C# 2008 Express Edition with SP1 - ENU 9.0.30729
Microsoft Windows SDK for Visual Studio 2008 SP1 Express Tools for Win32 6.1.5295.17011
Microsoft Windows SDK for Visual Studio 2008 SP1 Express Tools for .NET Framework - enu 3.5.30729
Sql Server Customer Experience Improvement Program 10.0.1600.22
SQL Server System CLR Types 10.0.1600.22
Visual C++ 8.0 ATL (x86) WinSXS MSM 8.0.50727.762
Visual C++ 8.0 CRT (x86) WinSXS MSM 8.0.50727.762
Any further advice - from anybody - is welcome.

BTW, I've also posted this problem on a MSDN forum for the Visual C# Express product, and so far have only received one response - and that one should have been filtered out by the forum moderator.

Dan
 
Old February 1st, 2009, 10:15 AM
Friend of Wrox
 
Join Date: Sep 2008
Posts: 234
Thanks: 0
Thanked 32 Times in 30 Posts
Default Properties problem

I just went to Microsoft's web site and the new download URL is:

http://www.microsoft.com/express/vcsharp/Default.aspx

Obviously, there's nothing we can do about URL's since Microsoft is free to change them as they see fit.

Once I reinstalled C# Express, I tried to create a new project. When you created the project, you can give it any name you wish. Then did you select Add New Item from the Project menu to add the new source file? Now select Code File from the templates, I usually name this new file frmMain.

Add the references to the project by selecting Add References fromt the Project menu. You need to add System, System.Drawing, and System.Windows.Forms.

Now select the project's Properties from the Project menu and set the Application.Startup Object to the name you gave the form (e.g., frmMain).

Once you do this, you need to add the skeleton template code that all projects use:

using System;
using System.Drawing;
using System.Windows.Forms;

public class frmMain:Form
{
private void InitializeComponent()
{
}
public frmMain()
{
InitializeComponent();
}
public static void Main()
{
frmMain main = new frmMain();
Application.Run(main);
}
}

Once you do this, the Solution Explorer should show frmMain using the Properties icon. You can either double-click the frmMain.cs line or click on the form icon in the menu bar of the Solution Explorer. Note the 4th line ends with ":Forms". You must have that at the end of the line.

If you add an object (e.g., textbox) to the project, you should be able to use F4 to see the Properties window.

I just went through these steps and it worked fine for me. (Excuse the non-formatted code, the Wrox editor seems to strip Tabs out of the text and I don't feel like using HTML to put them in!)

Dr. Purdum
__________________
Jack Purdum, Ph.D.
Author: Beginning C# 3.0: Introduction to Object Oriented Programming (and 14 other programming texts)
 
Old February 2nd, 2009, 05:34 PM
Registered User
 
Join Date: Jan 2009
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default solution to properties problem

Well, I ended up uninstalling everything - I had an earlier version of Visual Studio installed and two versions of the SQL stuff. After uninstallation, I restarted Windows and then deleted all the folders I could find related to Visual Studio and SQL. Then I downloaded VS again and reinstalled everything it needed.

Now, it works as it should. I'm guessing that the old VS version - over which I had installed the new version - was the cause of the trouble.

Thanks for your help with this. I appreciate it.

Dan





Similar Threads
Thread Thread Starter Forum Replies Last Post
Biggest .NET open source project? cyberjoe C# 1 February 18th, 2007 04:15 PM
getURL with javascript window.open properties nancy Flash (all versions) 9 June 4th, 2005 07:52 AM





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