473,695 Members | 2,510 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Creating dll and windows services with VB Express 2005

Hi all.
I need to build dll(s) and windows services using VB .NET 2005 Express. When
I make File/New project the windows contain only Windows application,
Windows control library, Console application, DVD collection starter kit.
How can I do? Any suggest?
Thanks in advance.

Nov 21 '05 #1
2 11803

Create a Windows Application in the Visual Studio, then conver it to dll
file and use command-line compiler to build the assembly.


"Val3" <va****@NOSPAMc ambieri.it> wrote in message
news:K6******** *************** @news4.tin.it.. .
Hi all.
I need to build dll(s) and windows services using VB .NET 2005 Express.
When I make File/New project the windows contain only Windows application,
Windows control library, Console application, DVD collection starter kit.
How can I do? Any suggest?
Thanks in advance.


Nov 21 '05 #2
That is a good question. VB Express is a very powerful tools at its limited feature set. With that said, I believe you can still do most things that is in the full featured parent
products it just does not have all the nice built in stuff that makes it really easy....

There are a couple of options....
1. You should be able to take an existing VS7/VS71 windows service project and open it up in the Express sku...migrate it to 2005 and their you go. Except you
probably do not have such a project :(
2. You can create one from "scratch". First create a vb win app - remove the form.vb file and add a new class file - next add a .net reference to System.servicep rocess -
next change the class file code to look something like the below where you handle all methods required for the service.

You will have some additional things to work through but hopefully this will get you started in the write direction.

BTW, the default vb .net windows service project when built into an assembly - is an Exe and not a Dll.

Hope this helps.


Imports System.ServiceP rocess

Public Class Service1
Inherits System.ServiceP rocess.ServiceB ase

#Region " Component Designer generated code "

Public Sub New()

' This call is required by the Component Designer.
InitializeCompo nent()

' Add any initialization after the InitializeCompo nent() call

End Sub

'UserService overrides dispose to clean up the component list.
Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean)
If disposing Then
If Not (components Is Nothing) Then
components.Disp ose()
End If
End If
MyBase.Dispose( disposing)
End Sub

' The main entry point for the process
<MTAThread()> _
Shared Sub Main()
Dim ServicesToRun() As System.ServiceP rocess.ServiceB ase

' More than one NT Service may run within the same process. To add
' another service to this process, change the following line to
' create a second service object. For example,
' ServicesToRun = New System.ServiceP rocess.ServiceB ase () {New Service1, New MySecondUserSer vice}
ServicesToRun = New System.ServiceP rocess.ServiceB ase () {New Service1}

System.ServiceP rocess.ServiceB ase.Run(Service sToRun)
End Sub

'Required by the Component Designer
Private components As System.Componen tModel.IContain er

' NOTE: The following procedure is required by the Component Designer
' It can be modified using the Component Designer.
' Do not modify it using the code editor.
<System.Diagnos tics.DebuggerSt epThrough()> Private Sub InitializeCompo nent()
components = New System.Componen tModel.Containe r()
Me.ServiceName = "Service1"
End Sub

#End Region

Protected Overrides Sub OnStart(ByVal args() As String)
' Add code here to start your service. This method should set things
' in motion so your service can do its work.
End Sub

Protected Overrides Sub OnStop()
' Add code here to perform any tear-down necessary to stop your service.
End Sub

End Class

Robert S (MSFT Visual Basic QA)
This reply is provided AS IS, without warranty (express or implied).
From: "Val3" <va****@NOSPAMc ambieri.it>
Newsgroups: microsoft.publi c.dotnet.langua ges.vb,microsof t.public.dotnet .languages.vb.u pgrade
Subject: Creating dll and windows services with VB Express 2005
Lines: 10
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
X-RFC2646: Format=Flowed; Original
X-Antivirus: avast! (VPS 0510-1, 11/03/2005), Outbound message
X-Antivirus-Status: Clean
Message-ID: <K6************ ***********@new s4.tin.it>
Date: Sat, 12 Mar 2005 13:27:06 GMT
X-Complaints-To: "Please send abuse reports to ab***@tin.it and technical notifications to ne********@tin. it"
X-Trace: news4.tin.it 1110634026 (Sat, 12 Mar 2005 14:27:06 MET)
NNTP-Posting-Date: Sat, 12 Mar 2005 14:27:06 MET
Organization : TIN
Path: TK2MSFTNGXA02.p hx.gbl!TK2MSFTN GXA01.phx.gbl!T K2MSFTNGP08.phx .gbl!newsfeed00 .sul.t-online.de!t-online.de!tisca li!newsfeed1.ip .tiscali.net!ne ws- out.tin.it!news-in.tin.it!news4 .tin.it.POSTED! not-for-mailXref: TK2MSFTNGXA02.p hx.gbl microsoft.publi c.dotnet.langua ges.vb.upgrade: 7256 microsoft.publi c.dotnet.langua ges.vb:264782
X-Tomcat-NG: microsoft.publi c.dotnet.langua ges.vb

Hi all.
I need to build dll(s) and windows services using VB .NET 2005 Express. When
I make File/New project the windows contain only Windows application,
Windows control library, Console application, DVD collection starter kit.
How can I do? Any suggest?
Thanks in advance.


Nov 21 '05 #3

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

Similar topics

by: gv | last post by:
Hi all, Can you create Windows Services in Visual Basic 2005 Express? Where is the template on create new? thanks Gerry
by: mosscliffe | last post by:
I wanted to install the SQL SERVER 2005 Express Advanced Services, because I wanted the import / export features of the data manager. I chose the route of deleting the template files and then installing, as my version of SQL Server express was part of the install, with Visual Web Developer 2005 Express Edition and I was not confident of re-installing just SQL Server Express. The install progressed quite nicely until I got the following...
by: Steven | last post by:
I have a service process that contains two services but only one of them ever works properly. The background is I have two classes which are Individual() and Mass() in the main service class and they both inherit ServiceBase. The main Method is as follows: static void Main() { System.ServiceProcess.ServiceBase ServicesToRun; ServicesToRun = new System.ServiceProcess.ServiceBase
by: E C H (He of too much code) | last post by:
I am very weak in VB.NET, I am using VB.NET 2k5 Express. I have only created one program, and heck it was my first ;-) (URL below if it matters). I am trying to create a program that stays resident, and after a period of inactivity on the computer locks the screen, only it can't use the screen saver interface if I understand it correctly (as the screensaver stuff creates an additional desktop virtual desktop that is unable to interact...
by: cj | last post by:
I've been writing Windows apps for years now but to become familiar with web apps I'm working my way through some instructions to build a web site using a SQL database. The instructions assume I'm using VB Express but I'm using VB 2005 pro. I ran into a problem when the instructions said to right click on App_Data in the Solution Explorer and add a new SQL database item. I got the following error: Connections to SQL Server...
by: =?Utf-8?B?QWxhc3RhaXIgQmVsbA==?= | last post by:
I am having trouble creating a web site on a server running sharepoint services. I am creating an ASP.Net website using Visual Studio 2005. The server I am trying to create it on is a Windows 2003 server. From what I understand I need to exclude in sharepoint services the folder where the application will be deployed. I have done this in the Define Managed Paths section of the Sharepoint management site, but it has no effect. Even after...
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 there's no template for windows services with the standard edition? are there VS templates published by 3rd parties i can download to ease implementation? tks
by: Manikandan | last post by:
Hi, I have a c# project in VSS 6.0D as projectv1 (v1 for version 1) Projectv1 has five or six solutions and around 100 projects (including setup projects). I need to create the version 2 for the same project and need to some modification for that version 2. I need to rename all the solutions and create a project in vss as projectv2. For that i downloaded all the project to my local folder and renamed solutions to version 2 and create a...
by: =?Utf-8?B?Sm9uIEphY29icw==?= | last post by:
We use SQL Server 2000 We user VS 2005 How can we use SQL Server reporting Services? Thanks,
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.