Wierd build error

I created a single form called 'StartForm' and a Dialog form called 'CountDown'. After debuging it - I added a deployment project. At my first build - I get a compile error with my original program. I deleted the deployment project, but I still get the same error. Recreating on a new project and copying my code from the old file reproduces the error.

In my project properties - The only start form I can select is "CountDown'. 'StartForm' is no longer recognised is a form. The compile error is -

Error 1 'StartForm' is a type in 'SchoolBells' and cannot be used as an expression. C:\Documents and Settings\Dean\My Documents\Visual Studio 2005\Projects\School Bell\School Bell\My Project\Application.Designer.vb 35 27

The error in Application.Designer.vb is -

Me.MainForm =Global.SchoolBells.StartForm

showing theGlobal.SchoolBells.StartForm as the error.

Searching the current project only shows startform as one of my class and the form name. What really gets me is that is StartForm.vb is there in my solution explorer, but is not accessible as a form. How did the type get changed?

Anybody with any ideas as to what is wrong?

[1481 byte] By [Deanrm] at [2007-12-24]
# 1
Try clicking on the show all files button in the Solution Explorer and see if there is a StartForm.designer.vb file.
DeborahK at 2007-8-31 > top of Msdn Tech,Visual Basic,Visual Basic IDE...
# 2

Yes, it's there and everything looks normal in it.

I am at a loss.

Dean

Deanrm at 2007-8-31 > top of Msdn Tech,Visual Basic,Visual Basic IDE...
# 3

You should change:

Me.MainForm = Global.SchoolBells.StartForm

to be:

Me.MainForm = New Global.SchoolBells.StartForm

Hope this helps,

MSFTAbelValadez at 2007-8-31 > top of Msdn Tech,Visual Basic,Visual Basic IDE...
# 4
Why would I have to change anything in this file? I did as you said and I still get the same error. I had stated earlier the my form is no longer recognised as a form, but as another type (whatever that is). If it was a form, I should be able to select it as my starting form in my program settings - not to do something strange in this setup application file.

This shows the typical quality of Microsoft products on new releases - very buggy and unreliable. They had not got it right on the first release since DOS 5.0.

To prove it was not my code. I copied it letter for letter into VB2003 and it works just fine.

If this sounds like I'm frustrated - you guessed right!

Dean

Deanrm at 2007-8-31 > top of Msdn Tech,Visual Basic,Visual Basic IDE...