473,666 Members | 2,044 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Changing a forms name

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)
Nov 20 '05 #1
27 2591
* =?Utf-8?B?QWxleCBMZXZ p?= <Al******@discu ssions.microsof t.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/>
Nov 20 '05 #2
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?QWxleCBMZXZ p?= <Al******@discu ssions.microsof t.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/>

Nov 20 '05 #3
* =?Utf-8?B?QWxleCBMZXZ p?= <Al******@discu ssions.microsof t.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/>
Nov 20 '05 #4

"Alex Levi" <Al******@discu ssions.microsof t.com> wrote in message
news:8A******** *************** ***********@mic rosoft.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.
Nov 20 '05 #5
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
Nov 20 '05 #6
Does Visual Studio 2005 fixed this BUG?

"Jeff Johnson [MVP: VB]" wrote:

"Alex Levi" <Al******@discu ssions.microsof t.com> wrote in message
news:8A******** *************** ***********@mic rosoft.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.

Nov 20 '05 #7
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******@discu ssions.microsof t.com> wrote in message
news:58******** *************** ***********@mic rosoft.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

Nov 20 '05 #8

"Alex Levi" <Al******@discu ssions.microsof t.com> wrote in message
news:C1******** *************** ***********@mic rosoft.com...
Does Visual Studio 2005 fixed this BUG?


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

Nov 20 '05 #9
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.


Nov 20 '05 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
5176
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 name. The first checkbox is to deny the user access and is named something like chkD followed by the user's id number from the database (ie; chkD20). The second checkbox is to allow the user access and is named chkA followed by the user's id...
7
6055
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 there any other way to display/undisplay parts of web pages? TIA
10
15356
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 identical field names. The queries select a subset of the fields, so "Select *" is not really an option. Is there an easy way to change the source of a query, either in the design grid or SQL display? I suppose I could copy the SQL into WordPad...
5
2940
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 in the associated table that this form is based on. Is there anyway I can do this with vba ? I am using a different button object to open this form for the field it is to update. button1 updates unbound field name from text1 to 101Commnets...
4
2434
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. The first class handles the form generation - (this was done using GUI form designer).
6
10483
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 done without API calls? Thanks Ioannis
7
2955
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 already formatted as "Shopping" ---Bold "for" -----Regular Now I want to underline whole text by preserving old style i.e. Bold and
1
2677
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 out the application (i.e. making copies of the database) to other locations (Reviews-NY, Review-Dallas etc). If was mentioned today in passing by the original developer that there is a way to change the title that appears on the switchboard without...
8
4358
Megalog
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 no Master/Child relationship set to the main form. Specifically the problem seems to be that everytime the recordsource of the subform is changed, the subform object itself tries to set a default Master/Child value (both fields fill with the "ID"...
0
8444
marktang
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8356
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
8551
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8639
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6198
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5664
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4198
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4368
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
1775
bsmnconsultancy
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.