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

Can you start a vb.net app without a form?

In vb6 you could start a program from a 'main' routine that was in a
module. But I don't see modules in vb.net. There just seem to be
forms and classes. Is there any way to start the program so that you
aren't showing a form immediately?
Thanks,
Marv
Jun 27 '08 #1
3 10716
On May 25, 2:03 pm, COHENMAR...@lycos.com wrote:
In vb6 you could start a program from a 'main' routine that was in a
module. But I don't see modules in vb.net. There just seem to be
forms and classes. Is there any way to start the program so that you
aren't showing a form immediately?
Thanks,
Marv
Just start a console application project, and your module is ready
with Sub Main().

Thanks,

Onur Güzel
Jun 27 '08 #2
CO*********@lycos.com wrote:
In vb6 you could start a program from a 'main' routine that was in a
module. But I don't see modules in vb.net. There just seem to be
forms and classes. Is there any way to start the program so that you
aren't showing a form immediately?
Thanks,
Marv
Option 1: In the project's properties (right click it and pick properties), turn
off Enable Application Framework. Then you can select a startup object,
including choosing Sub Main. You can add a Module to any project.

Option 2: Leave Enble Application Framework on, and click View Application
Events. This adds an ApplicationEvents module to your project. One of the events
you can handle is Startup, which will let you run code before the main form is
shown.
Jun 27 '08 #3
Marv,

To give you the oldest VB.Net version.

Right click on the project and do add new item and choose module

\\\
Module Module1
Private frm As Form1
Public Sub Main()
Application.Run()
frm.Show()
End Sub
End Module
///

Then we have something different per version, in version 2008 it is

Choose the properties from the applications and change the form project to a
console project and the "startup box" to Sub Main

Cor


<CO*********@lycos.comschreef in bericht
news:37**********************************@27g2000h sf.googlegroups.com...
In vb6 you could start a program from a 'main' routine that was in a
module. But I don't see modules in vb.net. There just seem to be
forms and classes. Is there any way to start the program so that you
aren't showing a form immediately?
Thanks,
Marv
Jun 27 '08 #4

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

Similar topics

0
by: Dean | last post by:
This is a problem in ASP.NET, when I run an application from Visual Studio (2003) when I do a "start without debugging". The asp page uses objects that I have built in 3 other projects,...
0
by: The Last Danish Pastry | last post by:
A couple of days ago there was a thread "Returning the machine epsilon". The responses in that thread suggested using Double.Epsilon or Single.Epsilon. Since both these seem to return zero I...
3
by: piotrek | last post by:
Hi. Its beginner question - sorry, but maybe someone can help me to start second form, from an existing one. I created and designed class Form2 that inherits from Form, and would like to see this...
1
by: VJ | last post by:
How do I start a form in new thread....?? Can you point me to any help file or web links that has samples. It would be helpful VJ
3
by: AnalogKid17 | last post by:
I have the following line of code in my start/login page: document.getElementById("txtLogin").focus(); When I run the website app through F5 (Debug, Start Debugging) it works fine (ie, focus...
1
by: ebrainers | last post by:
Hello Friends! I have three questions I wish to ask with regard to some tasks I am performing in Ms Access 2003. 1. I have a start up form named “Splash” which I want it to load for some...
4
by: Brett Wesoloski | last post by:
I just want to change the start up form. I did look under the projects-application properties but there is nothing to change. I would expect it to be in the start up object but all that was...
11
by: Toby | last post by:
I am a little new as you can tell by this post. This is my first c# window app and I made all my forms and now trying to go back and change the start up form and it is giving me errors when I...
4
by: John | last post by:
Hi My app needs to use the MyApplication_Startup and MyApplication_StartupNextInstance events but do not need the start-up form. How can I get rid of the start-up form as I can't select the Sub...
5
by: julietbrown | last post by:
When I was using earlier Access versions (nearly ten years ago, and I've forgotten a lot) I remember there was a way of specifying a form as the "start-up form" for a database, so that it opened as...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.