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

Event driven program exits

I have a basic VB.NET "windows application"
it does not need a form and is purely event driven.
At the moment when its is ran it performs the Sub Main startup then simply
EXITs because all the other code is event driven so there is nothing else to
run
what is the best way to keep my program running?
The program needs to use as little memory and CPU time as possible when its
sitting in the background(Thats why it has no form)

Thanx for any advice

_____________________________________

Matthew Purves , (Deadly_M)
www.DeadlyM.com
Nov 20 '05 #1
4 1175
* "Deadly_M" <NO********@REALdeadlym.com> scripsit:
I have a basic VB.NET "windows application"
it does not need a form and is purely event driven.
At the moment when its is ran it performs the Sub Main startup then simply
EXITs because all the other code is event driven so there is nothing else to
run
what is the best way to keep my program running?
For example, a call to 'Application.Run'.
The program needs to use as little memory and CPU time as possible when its
sitting in the background(Thats why it has no form)


Does a form actually need CPU /time/?

--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>
Nov 20 '05 #2
Sorry , don't understand, where would that line go ?

i have a SUB MAIN for initialise with some addhandlers for the events
then i have separate SUBs for each event
If i run it just now it obviously sets up and then simply exits

Thankyou

"Herfried K. Wagner [MVP]" <hi***************@gmx.at> wrote in message
news:c6************@ID-208219.news.uni-berlin.de...
* "Deadly_M" <NO********@REALdeadlym.com> scripsit:
I have a basic VB.NET "windows application"
it does not need a form and is purely event driven.
At the moment when its is ran it performs the Sub Main startup then simply EXITs because all the other code is event driven so there is nothing else to run
what is the best way to keep my program running?


For example, a call to 'Application.Run'.
The program needs to use as little memory and CPU time as possible when its sitting in the background(Thats why it has no form)


Does a form actually need CPU /time/?

--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>

Nov 20 '05 #3
* "Deadly_M" <NO********@REALdeadlym.com> scripsit:
Sorry , don't understand, where would that line go ?

i have a SUB MAIN for initialise with some addhandlers for the events
then i have separate SUBs for each event
If i run it just now it obviously sets up and then simply exits


That's why I suggested:
For example, a call to 'Application.Run'.


--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>
Nov 20 '05 #4
playing with it now , i think i see what your getting at
"Herfried K. Wagner [MVP]" <hi***************@gmx.at> wrote in message
news:c6************@ID-208219.news.uni-berlin.de...
* "Deadly_M" <NO********@REALdeadlym.com> scripsit:
Sorry , don't understand, where would that line go ?

i have a SUB MAIN for initialise with some addhandlers for the events
then i have separate SUBs for each event
If i run it just now it obviously sets up and then simply exits


That's why I suggested:
For example, a call to 'Application.Run'.


--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>

Nov 20 '05 #5

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

Similar topics

2
by: alanrn | last post by:
For all you seasoned VB programmers this is going to be a no brainer. However, as a C programmer learning VB I'm having trouble getting my arms around the event-driven nature of VB. Suppose I...
6
by: jose luis fernandez diaz | last post by:
Hi, I have a C program running in background in UNIX. From a shell script I want to notify it some events. The easiest way to do it is through signals, but it is not correct because signal are...
29
by: keredil | last post by:
Hi, Will the memory allocated by malloc get released when program exits? I guess it will since when the program exits, the OS will free all the memory (global, stack, heap) used by this...
14
by: Snor | last post by:
I'm attempting to create a lobby & game server for a multiplayer game, and have hit a problem early on with the server design. I am stuck between using a threaded server, and using an event driven...
4
by: AzizMandar | last post by:
C++ Event Coding Questions I have done some simple programs in C++ and read a lot of good C++ books (Including The C++ Programing Language, and C++ Primer) I am trying to understand and...
12
by: markwalker84 | last post by:
Hi there, just wondering if i could have a pointer inthe right direction here... Sorry about the massive code posting - is that a wrong thing to do? from Initials import * import wx...
2
by: John Kotuby | last post by:
Hi guys, I am converting a rather complicated database driven Web application from classic ASP to ASP.NET 2.0 using VB 2005 as the programming language. The original ASP application works quite...
0
MMcCarthy
by: MMcCarthy | last post by:
VBA is described as an Event driven programming language. What is meant by this? Access, like most Windows programs, is an event driven application. This means that nothing happens unless it is...
8
by: Brad Walton | last post by:
Hello. First post, but been doing a bit of reading here. I am working on a project in Java, but decided to switch over to C# after seeing some of the additional features I can get from C#. One of...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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
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
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.