473,399 Members | 4,192 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,399 software developers and data experts.

Can VB Standard do Windows Services?

I have VB standard 2003. Even though it doesn't have a built-in template
for Windows Services, is it possible to build and compile a service? If so,
how would I go about doing it?
Nov 21 '05 #1
1 913
You should be able to. You need to add a reference to
System.ServiceProcess.dll, and the appropriate Imports statement.

Then you have to create a class that Inherits from
System.ServiceProcess.ServiceBase.

Next you would have a Shared Sub Main similar to this one:

' The main entry point for the process
<MTAThread()> _
Shared Sub Main(ByVal args() As String)
Dim ServicesToRun() As System.ServiceProcess.ServiceBase

ServicesToRun = New System.ServiceProcess.ServiceBase() {New
ServiceClassName}
System.ServiceProcess.ServiceBase.Run(ServicesToRu n)
End Sub

Finally, override the OnStart, OnStop, etc events to provide your
service with functionality.

There is an article in the MSDN library called "Writing Services
Programatically". Search for that and it tells what to do.

Nov 21 '05 #2

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

Similar topics

0
by: Stefan Hinz | last post by:
Degan, jumping in to try and solve some problems that look pretty obvious to me ... > #options for default service (mysqld2) > (mysqld2) It should be , not (mysqld2).
29
by: David Eng | last post by:
In replying to P.J. Plauger (...
1
by: Thomas Holmgren | last post by:
Hi all I've tried to get my hands on the End User License Agreement for MS Visual C# .NET 2003 STANDARD edition, sofar without luck. Does anybody know where I can find the license agreement...
5
by: Microsoft | last post by:
Hi, I have Visual Basic .net 2003 (Standard Edition) & SQL Server 2000 Developer Edition. When trying to create a connection in the server explorer from the .net IDE I get a number of problems;...
1
by: Patrick | last post by:
With VS.NET Standard (not VS.NET Professional). Can i develop windows Services with this? Also, can i develop components for .NET Remoting? Currently I develop windows services with my VS.NET...
3
by: Peter | last post by:
I just bought VS.NET Standard 2005. But there aren't any projects for Windows Services and I know that I cannot develop VB.NET Stored Procedures (perhaps no projects for this too) But can I get...
4
by: Dica | last post by:
we just ordered VS 2005 standard edition. i was reading up on creating windows services and apparently this is only possible with the enterprise edition. is this true, or does it simply mean...
2
by: =?Utf-8?B?dmlzaHJ1dGg=?= | last post by:
Hi, I have 2 applications running, one Windows application project and the other windows services project. I want to call my Windows application in my windows services. I want to run them as...
37
by: Michael Palmer | last post by:
As anyone knows, the state of Python GUI programming is a little fractured at this time, with many toolkits, wrappers and meta-wrappers dead and alive, with or without documentation. I've come...
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
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
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
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...
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.