|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Renaming Form File QuestionHello!
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 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. Show quoteHide quote "Brian" wrote: > 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.
Show quoteHide quote "Donzo" <Do***@discussions.microsoft.com> wrote in message news:373B7597-3229-4F9D-AC0D-F9BC2CC16BDA@microsoft.com... > 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. > > "Brian" wrote: > >> 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 >> >> >>
How are you handling EUL agreement?
Panel-height greater Int16.MaxValue? Regex. Split or Split How to update an application Finding Version of All Asemblies Required by Application How to pass class as parameter? Category does not exist? How to Publish a Project to Production Server special character inside a string MsgBox Problem |
|||||||||||||||||||||||