Hi Toby,
I don't recommend moving the Main method from the Program file.
Instead, include the frmIMOptions's namespace into the Main method's scope.
You can do this quite easily in VS 2005:
1. Place the cursor over "frmIMOptio ns" in the following line:
>>Application.R un(new frmIMOptions()) ;
A red box should appear under the "s".
2. Hover the mouse over the red box
3. Click the drop-down array that appears
4. Select the "using" item that has the appropriate namespace for your class
To find out the namespace that frmIMOptions is in, open the file that contains
the frmIMOptions class in code view (probably "frmIMOptions.c s") and find the
namespace:
namespace ThisIsYourProje ct.AndThisIsASu bNamespace
{
public class frmIMOptions : Form
{
...
}
}
Let us know if you don't see the red box, the drop-down or the appropriate
namespace in the list
--
Dave Sexton
"Toby" <to**@notreal.c omwrote in message
news:OV******** ******@TK2MSFTN GP03.phx.gbl...
The static void Main() is in the Program.cs.
That is is where VS put it. Can I move that?
"V" <va************ *@gmail.comwrot e in message
news:11******** *************@i 42g2000cwa.goog legroups.com...
>Hmm... do you have a keyword public in front of the class declaration
for whichever form you are changing it to?
Or you can try moving the Main method to the form that you want to load
at startup and change the name of the form in Application.Run after
moving it.
Regards,
Vaibhav
On Nov 7, 12:14 am, "Toby" <t...@notreal.c omwrote:
>>I am a little new as you can tell by this post.
This is my first c# window app and I made all my forms and now trying to
go
back and change the start up form and it is giving me errors when I change
the form name that is below. And help on this would be nice..
Application.E nableVisualStyl es();
Application.S etCompatibleTex tRenderingDefau lt(false);
Application.R un(new frmIMOptions()) ;