 |
BOOK: Stephens' C# Programming with Visual Studio 2010 24-Hour Trainer
 | This is the forum to discuss the Wrox book Stephens' C# Programming with Visual Studio 2010 24-Hour Trainer by Rod Stephens; ISBN: 9780470596906 |
Welcome to the p2p.wrox.com Forums.
You are currently viewing the BOOK: Stephens' C# Programming with Visual Studio 2010 24-Hour Trainer 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
|
|
|
|

March 3rd, 2011, 09:19 AM
|
|
Registered User
|
|
Join Date: Mar 2011
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Chapter 13 Try It!
I think the Try It has the form creation steps backwards. The instructions had me creating the NewItem form first but that itself is the form that is called once the Add Item button is clicked on the AddOrderItems form.
Am I going nuts?
Great book by the way. I wish more programming books were structured like this one.
|
|

March 4th, 2011, 10:05 AM
|
 |
Wrox Author
|
|
Join Date: Jan 2006
Posts: 647
Thanks: 2
Thanked 96 Times in 95 Posts
|
|
Quote:
I think the Try It has the form creation steps backwards. The instructions had me creating the NewItem form first but that itself is the form that is called once the Add Item button is clicked on the AddOrderItems form.
Am I going nuts?
|
You're not going nuts. I was a bit unclear.
I meant to start a new project and then create the new form. Creating the new project makes the initial main form, which you later give controls. It's not that you can create the Add Item form without making the main form, I just meant to add controls to the Add Item form first.
And you don't really need to do it in that order, either. I just think of the Add Item form as the more interesting one so I focused on it first. You're certainly allowed to build them in either order and in many programs I end up jumping back and forth a bit to tweak one form after working on the other makes me think of something I missed.
Quote:
|
Great book by the way. I wish more programming books were structured like this one.
|
Thanks! I'm glad you're finding it useful. Post a review when you have a chance. And let me know if you have other questions or comments.
|
|

December 22nd, 2011, 05:09 AM
|
|
Registered User
|
|
Join Date: Nov 2011
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Quote:
Originally Posted by Rod Stephens
You're not going nuts. I was a bit unclear.
I meant to start a new project and then create the new form. Creating the new project makes the initial main form, which you later give controls. It's not that you can create the Add Item form without making the main form, I just meant to add controls to the Add Item form first.
And you don't really need to do it in that order, either. I just think of the Add Item form as the more interesting one so I focused on it first. You're certainly allowed to build them in either order and in many programs I end up jumping back and forth a bit to tweak one form after working on the other makes me think of something I missed.
Thanks! I'm glad you're finding it useful. Post a review when you have a chance. And let me know if you have other questions or comments.
|
I dont't understand:
I did the same mistake as MikerSU and creaded the forms in the wrong order so now when I run the program I end up with the New Item form first.
How do I change the startupsequence so that the first form displayed is the Add Order Items form?
Cheers
/Joakim
|
|

December 22nd, 2011, 12:15 PM
|
 |
Wrox Author
|
|
Join Date: Jan 2006
Posts: 647
Thanks: 2
Thanked 96 Times in 95 Posts
|
|
When you create a Windows Forms project, by default the initial form it creates is set as the start up form. To change that, open the Project menu and select Properties. Then on the Application tab, open the Startup Form dropdown and select the form that you want to launch when the program starts.
That's all there is to it. It's easy enough if you know where to look.
|
|

December 23rd, 2011, 03:21 AM
|
|
Registered User
|
|
Join Date: Nov 2011
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Quote:
Originally Posted by Rod Stephens
When you create a Windows Forms project, by default the initial form it creates is set as the start up form. To change that, open the Project menu and select Properties. Then on the Application tab, open the Startup Form dropdown and select the form that you want to launch when the program starts.
That's all there is to it. It's easy enough if you know where to look.
|
Thank's Rod but that didn't work.
I repeated the try-me and created the frames in the proper order and that works fine but I also wanted to try your work-around.
When I open the application tab from the properties I have a drop-down called 'Startup object' which I guess is the one to use. When I open it I only have two choices '(Not set)' and my projectnamen ending with '_Scope.Program'. I'm not allowed to enter data eighter
Nowhere can I find my alternate frame...
Merry x-mas
|
|

December 23rd, 2011, 11:49 AM
|
 |
Wrox Author
|
|
Join Date: Jan 2006
Posts: 647
Thanks: 2
Thanked 96 Times in 95 Posts
|
|
Ah, sorry. I was looking at a Visual Basic project.
In C# open the Program.cs file. In the code editor, there should be a line that looks like this:
Code:
Application.Run(new Form1());
That creates a Form1 object and displays it. Just change Form1 to the name of the form that you want to start up with and you should be set.
|
|

December 29th, 2011, 05:53 AM
|
|
Registered User
|
|
Join Date: Nov 2011
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Quote:
Originally Posted by Rod Stephens
Ah, sorry. I was looking at a Visual Basic project.
In C# open the Program.cs file. In the code editor, there should be a line that looks like this:
Code:
Application.Run(new Form1());
That creates a Form1 object and displays it. Just change Form1 to the name of the form that you want to start up with and you should be set.
|
Yes, thankyou that did the job for me. 
|
|

December 29th, 2011, 10:51 AM
|
 |
Wrox Author
|
|
Join Date: Jan 2006
Posts: 647
Thanks: 2
Thanked 96 Times in 95 Posts
|
|
I'm glad you figured it out
This is actually a little easier in Visual Basic. There you open the project's Property pages (Project > Properties) and on the Application tab you select teh start up form from the "Startup form" drop down.
|
|

March 29th, 2012, 10:54 AM
|
|
Registered User
|
|
Join Date: Mar 2012
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Trying to finish this Try it, but when debug mode passing this
"private void addItemButton_Click(object sender, EventArgs e)
{
NewItemForm dlg = new NewItemForm();
if (dlg.ShowDialog() == DialogResult.OK)" nothing happened.
Watched video several times and read this chapter, but can't figure out where is my mistake?!
|
|

March 30th, 2012, 03:19 AM
|
|
Registered User
|
|
Join Date: Mar 2012
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Any ideas??? What have I missed?
|
Similar Threads
|
| Thread |
Thread Starter |
Forum |
Replies |
Last Post |
| Chapter 13 |
rock1233 |
BOOK: Beginning ASP.NET 3.5 : in C# and VB BOOK ISBN: 978-0-470-18759-3 |
3 |
October 6th, 2009 12:18 PM |
| Chapter 13 |
bwoll |
BOOK: Beginning Access 2003 VBA |
1 |
June 7th, 2007 03:57 PM |
| problem in chapter 13 |
derrida |
BOOK: Beginning PHP5, Apache, and MySQL Web Development ISBN: 978-0-7645-7966-0 |
3 |
July 28th, 2006 02:31 AM |
| Chapter 13 |
ElMorenito |
BOOK: Beginning ASP 3.0 |
0 |
January 14th, 2005 02:56 PM |
|
 |
|