PC Review


Reply
Thread Tools Rate Thread

Changing a forms name

 
 
=?Utf-8?B?QWxleCBMZXZp?=
Guest
Posts: n/a
 
      6th Jul 2004
When I'm changing a forms name in the project and this form is a startup form (set in the project properties), I get an error that the function "sub main" is not found. The visual basic should automaticly change it's name in the project properties as it changes it automaticly in the code window.

Is there any fixes for it?
(I'm using Visual Studio .NET 2003)
 
Reply With Quote
 
 
 
 
Herfried K. Wagner [MVP]
Guest
Posts: n/a
 
      6th Jul 2004
* =?Utf-8?B?QWxleCBMZXZp?= <(E-Mail Removed)> scripsit:
> When I'm changing a forms name in the project and this form is a
> startup form (set in the project properties), I get an error that the
> function "sub main" is not found. The visual basic should automaticly
> change it's name in the project properties as it changes it automaticly
> in the code window.


Doubleclick the error. A dialog will popup that lets you select the new
startup form. If it doesn't, go to the project options dialog and set
the startup object there.

--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>
 
Reply With Quote
 
=?Utf-8?B?QWxleCBMZXZp?=
Guest
Posts: n/a
 
      6th Jul 2004
I know that I can change the startup form manually, but is there a way that it would change automaticly as the code windows does?



"Herfried K. Wagner [MVP]" wrote:

> * =?Utf-8?B?QWxleCBMZXZp?= <(E-Mail Removed)> scripsit:
> > When I'm changing a forms name in the project and this form is a
> > startup form (set in the project properties), I get an error that the
> > function "sub main" is not found. The visual basic should automaticly
> > change it's name in the project properties as it changes it automaticly
> > in the code window.

>
> Doubleclick the error. A dialog will popup that lets you select the new
> startup form. If it doesn't, go to the project options dialog and set
> the startup object there.
>
> --
> Herfried K. Wagner [MVP]
> <URL:http://dotnet.mvps.org/>
>

 
Reply With Quote
 
Herfried K. Wagner [MVP]
Guest
Posts: n/a
 
      6th Jul 2004
* =?Utf-8?B?QWxleCBMZXZp?= <(E-Mail Removed)> scripsit:
> I know that I can change the startup form manually, but is there a way that it would change automaticly as the code windows does?


I don't think so. But that's a two-clicks task.

--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>
 
Reply With Quote
 
Jeff Johnson [MVP: VB]
Guest
Posts: n/a
 
      6th Jul 2004

"Alex Levi" <(E-Mail Removed)> wrote in message
news:8A3FE5B2-2653-42C7-B905-(E-Mail Removed)...

> I know that I can change the startup form manually, but is there a way

that
> it would change automaticly as the code windows does?


No. You'll have to wait for VS 2005.


 
Reply With Quote
 
Cor Ligthert
Guest
Posts: n/a
 
      6th Jul 2004
Hi Alex,

Are you sure you want to change the Name of the class and not only the name
of the form which you can do with me.Text?

And when not, maybe you will tell us what is the reason that you want to
change the name of the Form (the object) and is it when you want to do that
a problem that you have to change the startup Form Class name in the project
properties (The startup form holds internally a Sub Main from the Form class
which it inherit)?

Cor


 
Reply With Quote
 
=?Utf-8?B?QWxleCBMZXZp?=
Guest
Posts: n/a
 
      6th Jul 2004
Does Visual Studio 2005 fixed this BUG?



"Jeff Johnson [MVP: VB]" wrote:

>
> "Alex Levi" <(E-Mail Removed)> wrote in message
> news:8A3FE5B2-2653-42C7-B905-(E-Mail Removed)...
>
> > I know that I can change the startup form manually, but is there a way

> that
> > it would change automaticly as the code windows does?

>
> No. You'll have to wait for VS 2005.
>
>
>

 
Reply With Quote
 
Samuel L Matzen
Guest
Posts: n/a
 
      6th Jul 2004
Alex,

Actually I think what you are seeing as a bug is probably intended behavior.
It just isn't the most desirable behavior. Visual Studio does not crash
when you change the name of the startup form, it simply asks you to select a
new startup class.

-Sam Matzen


"Alex Levi" <(E-Mail Removed)> wrote in message
news:584E0802-CC00-4668-80F3-(E-Mail Removed)...
> There is no special reason for changing the name, I just thought that this

BUG can be resolved some how.
>
>
> "Cor Ligthert" wrote:
>
> > Hi Alex,
> >
> > Are you sure you want to change the Name of the class and not only the

name
> > of the form which you can do with me.Text?
> >
> > And when not, maybe you will tell us what is the reason that you want to
> > change the name of the Form (the object) and is it when you want to do

that
> > a problem that you have to change the startup Form Class name in the

project
> > properties (The startup form holds internally a Sub Main from the Form

class
> > which it inherit)?
> >
> > Cor
> >
> >
> >



 
Reply With Quote
 
Jeff Johnson [MVP: VB]
Guest
Posts: n/a
 
      6th Jul 2004

"Alex Levi" <(E-Mail Removed)> wrote in message
news:C188E84D-245C-426E-9F21-(E-Mail Removed)...

> Does Visual Studio 2005 fixed this BUG?


That's what I meant by:

> > No. You'll have to wait for VS 2005.



 
Reply With Quote
 
Cor Ligthert
Guest
Posts: n/a
 
      6th Jul 2004
Hi Jeff,

You mean that when I in VS2005 change the name of the by the building of the
project by the wizard created form change, that that new name will be set as
the startup project?

I hope it is not.

By the way, I cannot call it a bug as you do, that when after that the
wizard did its work there is not wizard action anymore.

Cor

> > Does Visual Studio 2005 fixed this BUG?

>
> That's what I meant by:
>
> > > No. You'll have to wait for VS 2005.

>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
changing forms danklebs Microsoft Access 3 9th May 2010 04:50 PM
Changing what forms outlook uses as default forms Tskogseth Microsoft Outlook Discussion 1 19th Feb 2009 09:20 PM
Changing a forms name Haggr1 via AccessMonster.com Microsoft Access Forms 4 6th Jul 2007 04:13 PM
Changing Forms Gonçalo Ricardo Microsoft Excel Programming 1 26th Nov 2004 12:56 PM
Changing forms Jeremy Ames Microsoft C# .NET 3 3rd Jan 2004 09:03 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 08:34 PM.