473,396 Members | 1,712 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,396 software developers and data experts.

How to choose start class?

Hello. I have a windows forms application with one form. I added other class
files too. By default, the applications starts in the form class, but I want
it to start from other class. How can I do that?

--

Regards,

Diego F.

May 18 '07 #1
7 1513
Ok, I found it. I can choose it from the project properties page. I had to
uncheck 'Enable application framework' and then I can choose any file as
startup object.

--

Regards,

Diego F.
"Diego F." <di********@msn.comwrote in message
news:uw****************@TK2MSFTNGP06.phx.gbl...
Hello. I have a windows forms application with one form. I added other
class files too. By default, the applications starts in the form class,
but I want it to start from other class. How can I do that?

--

Regards,

Diego F.

May 18 '07 #2
Hi Diego,

Right click the project and choose "properties". On the application tab you
should find a drop-down list to choose which form you want to set as the
startup instance.

Robin

"Diego F." <di********@msn.comwrote in message
news:uw****************@TK2MSFTNGP06.phx.gbl...
Hello. I have a windows forms application with one form. I added other
class files too. By default, the applications starts in the form class,
but I want it to start from other class. How can I do that?

--

Regards,

Diego F.

May 18 '07 #3
Diego,

Be aware that you only can start from a module or a shared class (which is
in fact a module)

Cor

"Diego F." <di********@msn.comschreef in bericht
news:uw****************@TK2MSFTNGP06.phx.gbl...
Hello. I have a windows forms application with one form. I added other
class files too. By default, the applications starts in the form class,
but I want it to start from other class. How can I do that?

--

Regards,

Diego F.

May 18 '07 #4
"Cor Ligthert [MVP]" <no************@planet.nlschrieb:
Be aware that you only can start from a module or a shared class (which is
in fact a module)
?!?

VB.NET does not support shared classes (and no, I do not consider modules to
be shared classes). However, the 'Main' method can be specified in a class
if the *method* is marked as 'Shared'.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>

May 18 '07 #5
Yes you are right, however this is a newsgroup, not a documentation system.

In this newsgroup I can find plenty of messages, as well from Herfried K.
Wagner, where we talk about a shared class as the members are shared. And
because of the fact that it is impossible to build a class in VB.Net with
non shared public members a lot of us call that a shared class.

Cor
"Herfried K. Wagner [MVP]" <hi***************@gmx.atschreef in bericht
news:%2****************@TK2MSFTNGP05.phx.gbl...
"Cor Ligthert [MVP]" <no************@planet.nlschrieb:
>Be aware that you only can start from a module or a shared class (which
is in fact a module)

?!?

VB.NET does not support shared classes (and no, I do not consider modules
to be shared classes). However, the 'Main' method can be specified in a
class if the *method* is marked as 'Shared'.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>

May 19 '07 #6
"Cor Ligthert [MVP]" <no************@planet.nlschrieb:
Yes you are right, however this is a newsgroup, not a documentation
system.

In this newsgroup I can find plenty of messages, as well from Herfried K.
Wagner, where we talk about a shared class as the members are shared. And
because of the fact that it is impossible to build a class in VB.Net with
non shared public members a lot of us call that a shared class.
I feel sorry, but I really do not understand the last sentence. VB.NET does
not support the concept of a shared class for which the compiler enforces
all members to be marked as 'Shared', as it is supported for static classes
in C#.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>

May 19 '07 #7
VB.NET does not support the concept of a shared class for which the
compiler enforces all members to be marked as 'Shared', as it is supported
for static classes in C#.
See my 2 minutes later answered by you answered message too you.

Cor
May 19 '07 #8

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

Similar topics

1
by: DaBoo | last post by:
Hi! I'm creating dynamic a XML file. in this file are store some informations about images i use in HTML datasheets. i'm going to transform the XML file with XSLT. My Problem is, that {image}...
0
by: Daniel Lidström | last post by:
Hi! Why can't I choose location of the .h/.cpp files in the class wizard? If I try to place them under a directory in the source tree then I need to select an existing file! Why can't I just...
3
by: DD | last post by:
I have frmMain and fsub you choose a month from the ChooseMonth combo and all the records for that month are nopw visible in the fsub I know print with the following Where and only recieve the...
16
by: Serdar Kalaycý | last post by:
Hi everybody, My problem seems a bit clichè but I could not work around. Well I read lots of MSDN papers and discussions, but my problem is a bit different from them. When I tried to run the...
9
by: Tim D | last post by:
Hi, I originally posted this as a reply to a rather old thread in dotnet.framework.general and didn't get any response. I thought it might be more relevant here; anyone got any ideas? My...
0
by: guido_brasletti | last post by:
Hi, I'm asking for help because I read dozens of threads on this subject, but I still cannot make it work. I'm developing an ASP script (running on a SBS 2k. I'm a beginner with ASP) to use on...
4
by: freefly_xml | last post by:
I want to test to see if I am on the last page of a document. In this example it is an invoice. I want to print a different table in REGION AFTER when I am on the last page. I have tried many...
8
by: Carl Heller | last post by:
If I'm creating a class to do some work that I want threaded out, where's the best location to call ThreadStart? Or does it depend on the nature of the work? a. Call it outside the class,...
2
menayah
by: menayah | last post by:
Dear All, I want to start a web based project for a production company, before i start i need to decide which framework to choose, .NET 2.0 or JSP. Which one have better functionality regarding...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
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,...
0
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...
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...

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.