Renaming Form File Question

  • Thread starter Thread starter Brian
  • Start date Start date
B

Brian

Hello!

I am using a book that tells me to rename form1.vb in the Solution Explorer
and if I do this, the program never runs. It gives me a sorts of errors.
Starting with saying the EXE file is missing and then says:

'Sub Main' was not found in 'Picture_Viewer.Form1'.

It told me to rename form1.vb to fclsViewer.vb.

If I had left it alone, it would compile and run. Is this book in error and
left out a step or am I doing something wrong?

Thanks,
Brian
 
Yes..thank you. A "duh" moment for me.

Donzo said:
You have to change the class name to what you just renamed the form to.
If you go into the code view of the form you just changed the name of in
the
solution explorer(fclsViewer.vb) you will notice that the class name is
still
form1. Change this to the new name (fclsViewer) and set the project to
use
this form at startup.
 

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