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) 27 2571
* =?Utf-8?B?QWxleCBMZXZp?= <Al******@discussions.microsoft.com> 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/>
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?= <Al******@discussions.microsoft.com> 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/>
* =?Utf-8?B?QWxleCBMZXZp?= <Al******@discussions.microsoft.com> 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/>
"Alex Levi" <Al******@discussions.microsoft.com> wrote in message
news:8A**********************************@microsof t.com... 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.
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
Does Visual Studio 2005 fixed this BUG?
"Jeff Johnson [MVP: VB]" wrote: "Alex Levi" <Al******@discussions.microsoft.com> wrote in message news:8A**********************************@microsof t.com...
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.
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" <Al******@discussions.microsoft.com> wrote in message
news:58**********************************@microsof t.com... 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
"Alex Levi" <Al******@discussions.microsoft.com> wrote in message
news:C1**********************************@microsof t.com... Does Visual Studio 2005 fixed this BUG?
That's what I meant by: No. You'll have to wait for VS 2005.
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.
Hi Alex,
Setting the startup name in the properties is an action from the project
building wizard, that stops working after the first building is done.
That is normal behaviour of every wizard.
Why you call this a bug?
Cor
"Cor Ligthert" <no**********@planet.nl> wrote in message
news:u2**************@tk2msftngp13.phx.gbl... 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?
If you create a Windows application you will get the default Form1 and it
will be set as the startup form (form, not project). If you subsequently
change the form's name (say, to frmMain), VS 2005 will change the startup
form to match it so you don't have to manually go into the project
properties and do it like you have to now.
If a different form (or Sub Main) is set as the startup form, nothing will
happen when you rename this form. VS 2005 simply synchronizes your name
change across the project.
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.
"Bug" was the original poster's word, not mine.
"Cor Ligthert" <no**********@planet.nl> wrote in message
news:%2******************@TK2MSFTNGP10.phx.gbl... Setting the startup name in the properties is an action from the project building wizard, that stops working after the first building is done.
That is normal behaviour of every wizard.
Why you call this a bug?
It's more of an oversight. If the project was set for Form1 to be the
startup form and you change Form1's name to frmMain, it's silly for Visual
Studio to still have the startup form set to Form1 when such a form no
longer exists in the project.
Hi Jeff,
After overthinking it, I think that understand my misunderstanding, I never
change the class name in the designer. I agree that when you do it that way,
what is probably ment here, it can change the properties as well from the
startup project.
Cor
Hi Alex,
I never change the class name using the designer, when you do it that way,
it can as well automaticly be done for the startup project, I agree that
with you, however to call it a bug is something to much, you can call it a
small disadvantage in my opinion.
Cor
"Cor Ligthert" <no**********@planet.nl> wrote in message
news:um**************@tk2msftngp13.phx.gbl... After overthinking it, I think that understand my misunderstanding
The wise man knows what he does not know.
* "Jeff Johnson [MVP: VB]" <i.***@enough.spam> scripsit: Setting the startup name in the properties is an action from the project building wizard, that stops working after the first building is done.
That is normal behaviour of every wizard.
Why you call this a bug?
It's more of an oversight. If the project was set for Form1 to be the startup form and you change Form1's name to frmMain, it's silly for Visual Studio to still have the startup form set to Form1 when such a form no longer exists in the project.
I agree, if the form is /deleted/, then the user should get prompted for
selecting the startup form. Nevertheless, when simply /renaming/ the
class that is treated as startup form, VB should set the renamed form as
startup form automatically or ask if it should be taken as startup form.
--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>
* "Cor Ligthert" <no**********@planet.nl> scripsit: 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?
Startup project? Startup form?
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.
I never used a wizard to create a Windows Forms application, but there
was still a startup form selected automatically.
--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>
* =?Utf-8?B?QWxleCBMZXZp?= <Al******@discussions.microsoft.com> scripsit: Mayble, but I'm not deleting a form, just changing it's name. So VB.NET should change it's name anyware, including in the project properies, like it does in the code window. If I were deleting the form, then I would agree with you that the user must re-enter a new form as for a startup form.
I agree, it would be nice if that would work. I didn't take a look, but
I assume that this will be done automatically in VB 2005.
--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>
Hi Herfried,
Try in VS IDE File->New->Project than opens a window choose Visual Basic
Projects and than Windows Application. Give the name for your application.
A wizard will than generate a complete project for you. (Such a thing is
called a wizard even if it is not named a wizard)
I understand from you that you use empty project, however I find that to
much work.
:-)
Cor I never used a wizard to create a Windows Forms application, but there was still a startup form selected automatically.
"Alex Levi" <Al******@discussions.microsoft.com> wrote in message
news:0E**********************************@microsof t.com... Is it possible to have a fix or an update to VS .NET 2003 for this
problem? I just work a lot with students and show them how to work in VS so I'm changing the form's names a lot, and I alwase have to change the startup
form. It would be much easier to work with if this problem would some how
resolved.
I doubt MS will "fix" it in existing version if Visual Studio. Perhaps a
macro or an add-in could be created, but that would probably be a lot more
trouble than it's worth. It's just one error. Teach your students how to
handle it.
* "Cor Ligthert" <no**********@planet.nl> scripsit: Try in VS IDE File->New->Project than opens a window choose Visual Basic Projects and than Windows Application. Give the name for your application.
A wizard will than generate a complete project for you. (Such a thing is called a wizard even if it is not named a wizard)
OK, I didn't consider that to be a wizard, I thought that's a
"template".
--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>
"Herfried K. Wagner [MVP]" <hi***************@gmx.at> wrote in message
news:2l************@uni-berlin.de... Try in VS IDE File->New->Project than opens a window choose Visual
Basic Projects and than Windows Application. Give the name for your
application. A wizard will than generate a complete project for you. (Such a thing is called a wizard even if it is not named a wizard)
OK, I didn't consider that to be a wizard, I thought that's a "template".
I think someone needs to make a formal definition of "Wizard" as requiring
more than one "page" before it completes its job. I've never thought of the
New Project dialog as a wizard either.
> Does Visual Studio 2005 fixed this BUG?
I wouldn't call it a bug.... I've never in all my years had a problem with
this, i'd say if anything it's a slight inconvenience.
--
HTH,
-- Tom Spink, Über Geek
Woe be the day VBC.EXE says, "OrElse what?"
Please respond to the newsgroup,
so all can benefit
"Alex Levi" <Al******@discussions.microsoft.com> wrote in message
news:C1**********************************@microsof t.com... Does Visual Studio 2005 fixed this BUG? "Jeff Johnson [MVP: VB]" wrote:
"Alex Levi" <Al******@discussions.microsoft.com> wrote in message news:8A**********************************@microsof t.com...
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.
* =?Utf-8?B?QWxleCBMZXZp?= <Al******@discussions.microsoft.com> scripsit: Is it possible to have a fix or an update to VS .NET 2003 for this problem?
There is nothing to fix. This behavior is IMO "by design".
I just work a lot with students and show them how to work in VS so I'm changing the form's names a lot, and I alwase have to change the startup form.
OK, I understand that this is a very special situation, but I never had
a problem with that because you see an error in the tasklist and can
select the new startup form using an UI, so that's a pretty easy task.
--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>
* "Tom Spink" <thomasdotspinkatsp@mntlworlddotcom> scripsit: Does Visual Studio 2005 fixed this BUG?
I wouldn't call it a bug.... I've never in all my years had a problem with this, i'd say if anything it's a slight inconvenience.
The behavior changed in VB 2005. Renaming the /file/ will rename the class,
and renaming the class will cause VB to update the startup object.
--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>
* "Jeff Johnson [MVP: VB]" <i.***@enough.spam> scripsit: OK, I didn't consider that to be a wizard, I thought that's a "template".
I think someone needs to make a formal definition of "Wizard" as requiring more than one "page" before it completes its job. I've never thought of the New Project dialog as a wizard either.
Wizards, IMO, have a certain look, there is a common set of buttons
("Next >", "Finish", ...). Still, there is kind of magic in how VS puts
together the project from the template ;-).
--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>
I agree that this is not a difficult task but it would be nice to have it fixed.
"Herfried K. Wagner [MVP]" wrote: * =?Utf-8?B?QWxleCBMZXZp?= <Al******@discussions.microsoft.com> scripsit: Is it possible to have a fix or an update to VS .NET 2003 for this problem?
There is nothing to fix. This behavior is IMO "by design".
I just work a lot with students and show them how to work in VS so I'm changing the form's names a lot, and I alwase have to change the startup form.
OK, I understand that this is a very special situation, but I never had a problem with that because you see an error in the tasklist and can select the new startup form using an UI, so that's a pretty easy task.
-- Herfried K. Wagner [MVP] <URL:http://dotnet.mvps.org/> This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Jason Dykes |
last post by:
I have a page that is database driven. The pages shows a user's name
and whether they have access to our site or not. this is done by
displaying two checkboxes positioned to the right of the users...
|
by: Stefan Finzel |
last post by:
Hi,
is there a way to change the display property on Windows Mobile 2003 SE
Mobile/Pocket Internet Explorer? See following example.
Please note: visibilty property has the same problem.
Is...
|
by: Marizel |
last post by:
I'm not sure there's an easy solution to this, but thought I'd ask. I
often find myself with a query which I'd like to reuse, but with a
different datasource. These datasources generally have...
|
by: David |
last post by:
Hi
I seem to be getting nowhere with this. I am opening a form which will
be used to input Notes into different fields in a table. My problem is
changing the unbound field name to the field name...
|
by: Tony W |
last post by:
Hi,
I am trying to write a simple application to retrieve data from the
Windows registry and insert it into textboxs on a windows form.
So far I have one namespace containing two classess.
...
| |
by: Ioannis Demetriades |
last post by:
Hi,
I need to change the printer's font to "control" -a printer font, and then
send a sequence of characters to the printer. My problem is that I cannot
change the printer's font. Can this be...
|
by: Sakharam Phapale |
last post by:
Hi All,
How to preserve the old font properties while changing new one?
I posted same question 2 months back, but I had very small time then.
eg. "Shopping for" is a text in RichTextBox and...
|
by: mplus_2000 |
last post by:
I have recently inherited a database. The switchboard (and other forms)
displays the name of the database on it (top, center). Currently the
name that appears is Reviews. There are plans to roll...
|
by: Megalog |
last post by:
Hey guys.. my turn to ask a question:
I'm having a weird issue with a form I've reworked. This form has a combo box, which when used is changing the recordsource of a subform. This subform has...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
| |
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...
| |