473,403 Members | 2,222 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,403 software developers and data experts.

Multiple Sub Main?

Originally posted this in the upgrade forum without an answer:

I had an old VB program that I pulled into VS2005 to see if I could
get anything useful out of the upgrade wizard. Well the program did not have
a Sub Main, so I added that to a module and tried to set that as the startup
object. But now I have this error:

Error 1 'Sub Main' is declared more than once in 'MyUpgradedProject':
MyUpgradedProject.My.MyApplication.Main(Args() As String),
MyUpgradedProject.modFunctions.Main()
Did a search through both the project and the files and cannot find
My.MyApplication.Main. I'm guessing this is some reference that the upgrade
"wizard" created in a buried file. Any ideas?
Aug 31 '06 #1
1 5202
Earl,

By default has a form project a hidden Sub main class.

Although that should not be used if you are using your own Sub main.

Have you looked in the properties of the application what is the Start up.
If it is a Form than you do not need in fact the Sub main.
However some as by instance Herfried like to start a program with Sub Main.
(By instance for setting the visual styles)

Cor

"Earl" <br******@newsgroups.nospamschreef in bericht
news:%2****************@TK2MSFTNGP02.phx.gbl...
Originally posted this in the upgrade forum without an answer:

I had an old VB program that I pulled into VS2005 to see if I could
get anything useful out of the upgrade wizard. Well the program did not
have
a Sub Main, so I added that to a module and tried to set that as the
startup
object. But now I have this error:

Error 1 'Sub Main' is declared more than once in 'MyUpgradedProject':
MyUpgradedProject.My.MyApplication.Main(Args() As String),
MyUpgradedProject.modFunctions.Main()
Did a search through both the project and the files and cannot find
My.MyApplication.Main. I'm guessing this is some reference that the
upgrade
"wizard" created in a buried file. Any ideas?


Aug 31 '06 #2

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

Similar topics

5
by: Charles L | last post by:
Can someone explain to me what the following means? "C permits multiple definitions of a variable in any given namespace, provided the definitions are the same and it generates only a single...
10
by: PCHOME | last post by:
Hi! Would someone please help me thess C error(in gcc on Linux)? The compiler continues to give me: readLP.o: In function `Input_Problem': readLP.o(.text+0x0): multiple definition of...
5
by: Victor | last post by:
In his book "Programming Microsoft Windows with C#", page 42, Petzold deals with the case of a project with multiple Mains. He explains that when compiling in the command line the argument /main...
6
by: James Radke | last post by:
Hello, I have a multithreaded windows NT service application (vb.net 2003) that I am working on (my first one), which reads a message queue and creates multiple threads to perform the processing...
9
by: pranav.choudhary | last post by:
I hope the question is not silly. 1. Can there me more than one main in a C program. 2. Can main take more arguments thac argc and argv. If yes then whar are they meant for??
4
by: yancheng.cheok | last post by:
Recently, I try to replace #define with const in header file. However, there are concerns on, multiple const object will be created, if the header file is included in multiple cpp files. For...
3
by: Student | last post by:
Hi all, While compiling a program I had this message : tools.o(.data+0x0): multiple definition of `VAR_1' main.o(.data+0x0): first defined here tools.o(.data+0x4): multiple definition of...
7
by: =?Utf-8?B?TG9zdEluTUQ=?= | last post by:
Hi All :) I'm converting VB6 using True DBGrid Pro 8.0 to VB2005 using DataGridView. True DBGrid has a MultipleLines property that controls whether individual records span multiple lines. Is...
5
by: Neil | last post by:
"lyle" <lyle.fairfield@gmail.comwrote in message news:48c3dde7-07bd-48b8-91c3-e157b703f92b@f3g2000hsg.googlegroups.com... Question for you. I'm doing something similar, only, instead of opening...
2
by: Immortal Nephi | last post by:
You may have heard diamond shape. You create one base class. One base class has member functions and member variables. You create two derived classes. All member functions and member variables...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
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,...
0
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...
0
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...
0
agi2029
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,...
0
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...

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.