Specialty Forums
Security and Virus
General Hardware
CPUs/Overclocking
Networking
Digital Photo/Video
Office Software
PC Gaming
Console Gaming
Programming
Database
Web Development
Digital Home

General Forums
Windows XP
Windows Vista
Windows 95/98
Windows Me
Windows NT
Windows 2000
Win Server 2008
Win Server 2003
Windows 3.1
Linux
PDAs
BeOS
Novell Netware
OpenVMS
Solaris
Disk Op. System
Unix
Mac
OS/2

Drivers
Driver Scan
Driver Forum

Software
Automatic Updates

BIOS Updates

My Computing.Net

Solution Center

Free IT eBook

Howtos

Site Search

Message Find

RSS Feeds

Install Guides

Data Recovery

About

Home
Reply to Message Icon Go to Main Page Icon

.net framework 2002 question

Original Message
Name: gtlakes
Date: January 8, 2008 at 15:16:24 Pacific
Subject: .net framework 2002 question
OS: xp/sp2
CPU/Ram: 3ghz 1ghz
Model/Manufacturer: dimension 8100
Comment:
I'm a newb to .net framework (version 2002) and I bought the academic version along with the textbook that supposedly teaches it.
Right off the bat - the very first most basic program (2 lines of code) will not work.
I googled the error and M$ says it's a known bug and gives steps to correct it.. However, part of the steps to take are not within my program.
This is in VB (btw) and I am told to go into the project/properties and common area.
I am them to click the
"General" tab and I don't have a general tab or button or anything else "general"
The error is:
"Sub main not found in 'welcome1.module1'
This is because part of the lesson is to rename "Module1" to "Welcome1".
Leaving it at "Module1" will work but I want to know why (if possible) the way the text book shows doesn't work and how do I fix it?
Sorry for the long post.. I'm 62 years old and I tend to blather.
Thanks!

Report Offensive Message For Removal


Response Number 1
Name: MarkM
Date: January 9, 2008 at 00:33:36 Pacific
Subject: .net framework 2002 question
Reply: (edit)
Basically, the Sub called Main is a method within the module called Module1. These are created by the template when you start a new project. When the program executes it needs to know which bit of code to execute first, its entry point if you will. For any code outside of the Module1 to call Main, it needs to fully qualify it as such: Module1.Main.

If you change the name of the module to Welcome1, you need to update the setting on the General section of properties you mentioned to reflect this, to let it know the entry point is different ie: Welcome1.Main. Because this isn't being updated, that is why it works when you rename back to Module1.

I've got v2003 here, but I think it's the same route as described here:
On the Project menu at the top, select ConsoleApplication1 Properties (if you called your project something else, then ConsoleApplication1 will be replaced with whatever you called it). On the dialogue that appears, there should be two combo boxes, one called Output type and one called Startup object. If you click on Startup object, the name of your module should appear, whether it is called Module1 or Welcome1. By selecting it and clicking OK, you should update this setting.


Report Offensive Follow Up For Removal

Response Number 2
Name: gtlakes
Date: January 9, 2008 at 07:33:11 Pacific
Subject: .net framework 2002 question
Reply: (edit)
Thanks for the reply Mark - but in my 2002 version, all that is listed in the Projects Menu is this:
Add Windows Form...
Add Inherited Form...
Add User Control...
Add Inherited Control...
Add Component...
Add Module...
Add Class...
------------------
Add New Item...
Add Exsisting Item...
------------------
Exclude Project...
Show All Files...
------------------
Add Reference
Add Web Reference
Set As Startup Project

This last item doesn't make any difference. Clicking it and then rebuilding causes the same error.
Thanks for the reply anyway. Looks like I got stuck with a turkey - this 2002 version.

Tom


Report Offensive Follow Up For Removal

Response Number 3
Name: Razor2.3
Date: January 9, 2008 at 15:13:39 Pacific
Subject: .net framework 2002 question
Reply: (edit)
I currently have VS2K5 installed, and I can change the startup forum by going to the Solution Explorer and selecting Properties from the WindowsApplication1's right-click menu. Somewhere in that dialog should be an option for the Startup form.

If that doesn't work, you could always try a newer version.


Report Offensive Follow Up For Removal

Response Number 4
Name: gtlakes
Date: January 9, 2008 at 17:32:47 Pacific
Subject: .net framework 2002 question
Reply: (edit)
Thanks for the imput!
I stumbled upon the solution when clicking and peeking everywhere I could find.
The solution for VB2000 is to right-click the name "Welcome1" in the "Solution Explorer" window and select "Properties" and in there is the "General" setting that's needed.
*whew* I was really getting the mumbles!
Tom

Report Offensive Follow Up For Removal




Use following form to reply to current message:

   Name: From My Computing.Net Settings
 E-Mail: From My Computing.Net Settings

Subject: .net framework 2002 question

Comments:

 
  Homepage URL (*): 
Homepage Title (*): 
         Image URL: 
 


Data Recovery Software




Slow boot time

Trasnferring Documents from old HD

My k8T Neo-v usb's aren't working!

Date Modified = Date Created Time

system files on removable harddrive


The information on Computing.Net is the opinions of its users. Such opinions may not be accurate and they are to be used at your own risk. Computing.Net cannot verify the validity of the statements made on this site. Computing.Net and Computing.Net, LLC hereby disclaim all responsibility and liability for the content of Computing.Net and its accuracy.
PLEASE READ THE FULL DISCLAIMER AND LEGAL TERMS BY CLICKING HERE

All content ©1996-2007 Computing.Net, LLC