Initial Screen

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a Visual C#.Net Windows application. I would like to replace the
initial screen with another screen. Can you tell me how to do this. The
original screen 'Owner-Info', I would use 'MyPetPlaces' which will call
'Owner-Info'.
 
look in your Program.cs, it has application.run(someform) change someform
for the other one
 
Daniel, Thanks, the application does not have a 'program.cs'. The
'application.run' is in 'Owner.cs' program. I changed the
application.run(new owner()) to application.run(MyPetPlaces()). It would not
compile

'Error 13 D:\Kennel\Owner-Info\Owner.cs 1246 20 Owner-Info 'Owner_Info.MyPetPlaces' is a 'type' but is used like a 'variable''
 
lol look closer.

"application.run(new owner()) to application.run(MyPetPlaces())."

what is the other one missing?

change it to

application.run(new MyPetPlaces());

without the new operator it wont create an instance, hence the compile
error.

And owner.cs/Programme.cs same thing, its still your poijt of entry where
you main method is.
 
normb said:
Daniel, Thanks, the application does not have a 'program.cs'. The
'application.run' is in 'Owner.cs' program. I changed the
application.run(new owner()) to application.run(MyPetPlaces()). It would
not
compile

'Error 13 D:\Kennel\Owner-Info\Owner.cs 1246 20 Owner-Info
'Owner_Info.MyPetPlaces' is a 'type' but is used like a 'variable''

Replace:

Application.Run(MyPetPlaces())

With:

Application.Run(New MyPetPlaces())

HTH,
Mythran
 
Daniel, My application does not have a program.cs. this code is in my
'Owner.cs' #endregion

/// <summary>
/// The main entry point for the application.
/// </summary>
[STAThread]
static void Main()
{
Application.Run(new Owner());
}

I tried changing 'new Owner' to 'new MyPetPlaces' and got complie errors.
Was this the right thing to do?

HELP!!!
 
Hi,

What are the compiler errors?

--
Dave Sexton

nbohana said:
Daniel, My application does not have a program.cs. this code is in my
'Owner.cs' #endregion

/// <summary>
/// The main entry point for the application.
/// </summary>
[STAThread]
static void Main()
{
Application.Run(new Owner());
}

I tried changing 'new Owner' to 'new MyPetPlaces' and got complie errors.
Was this the right thing to do?

HELP!!!
--
Norm Bohana


Daniel said:
look in your Program.cs, it has application.run(someform) change someform
for the other one
 
Ok stop worrying about the program.cs. Your MAIN entry point is what
matters, it could be anywhere.

You need to tell us the compiler error. In MyNetPlaces a form for a start?
Below should work.

Also make sure if MyNetSPaces is in a different namespace this is included
via the 'using' operator.

[STAThread]
static void Main()
{
Application.Run(new MyNetPlaces());
}

nbohana said:
Daniel, My application does not have a program.cs. this code is in my
'Owner.cs' #endregion

/// <summary>
/// The main entry point for the application.
/// </summary>
[STAThread]
static void Main()
{
Application.Run(new Owner());
}

I tried changing 'new Owner' to 'new MyPetPlaces' and got complie errors.
Was this the right thing to do?

HELP!!!
--
Norm Bohana


Daniel said:
look in your Program.cs, it has application.run(someform) change someform
for the other one
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top