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

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 11780

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****@NOSPAMcambieri.it> wrote in message
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.serviceprocess -
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.ServiceProcess

Public Class Service1
Inherits System.ServiceProcess.ServiceBase

#Region " Component Designer generated code "

Public Sub New()

' This call is required by the Component Designer.

' Add any initialization after the InitializeComponent() 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
End If
End If
End Sub

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

' 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.ServiceProcess.ServiceBase () {New Service1, New MySecondUserService}
ServicesToRun = New System.ServiceProcess.ServiceBase () {New Service1}

System.ServiceProcess.ServiceBase.Run(ServicesToRu n)
End Sub

'Required by the Component Designer
Private components As System.ComponentModel.IContainer

' 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.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
components = New System.ComponentModel.Container()
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****@NOSPAMcambieri.it>
Newsgroups: microsoft.public.dotnet.languages.vb,microsoft.pub lic.dotnet.languages.vb.upgrade
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***********************@news4.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.phx.gbl!TK2MSFTNGXA01.phx.gbl!TK2MSF TNGP08.phx.gbl!newsfeed00.sul.t-online.de!t-online.de!tiscali!newsfeed1.ip.tiscali.net!news- out.tin.it!news-in.tin.it!news4.tin.it.POSTED!not-for-mailXref: TK2MSFTNGXA02.phx.gbl microsoft.public.dotnet.languages.vb.upgrade:7256 microsoft.public.dotnet.languages.vb:264782
X-Tomcat-NG: microsoft.public.dotnet.languages.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...
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...
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...
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...
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...
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...
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...
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: VivesProcSPL | last post by:
Obviously, one of the original purposes of SQL is to make data query processing easy. The language uses many English-like terms and syntax in an effort to make it easy to learn, particularly for...
by: mar23 | last post by:
Here's the situation. I have a form called frmDiceInventory with subform called subfrmDice. The subform's control source is linked to a query called qryDiceInventory. I've been trying to pick up the...
by: abbasky | last post by:
### Vandf component communication method one: data sharing ​ Vandf components can achieve data exchange through data sharing, state sharing, events, and other methods. Vandf's data exchange method...
by: jimatqsi | last post by:
The boss wants the word "CONFIDENTIAL" overlaying certain reports. He wants it large, slanted across the page, on every page, very light gray, outlined letters, not block letters. I thought Word Art...
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 7 Feb 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:30 (7.30PM). In this month's session, the creator of the excellent VBE...
by: fareedcanada | last post by:
Hello I am trying to split number on their count. suppose i have 121314151617 (12cnt) then number should be split like 12,13,14,15,16,17 and if 11314151617 (11cnt) then should be split like...
by: egorbl4 | last post by:
Скачал я git, хотел начать настройку, а там вылезло вот это Что это? Что мне с этим делать? ...
by: davi5007 | last post by:
Hi, Basically, I am trying to automate a field named TraceabilityNo into a web page from an access form. I've got the serial held in the variable strSearchString. How can I get this into the...
by: MeoLessi9 | last post by:
I have VirtualBox installed on Windows 11 and now I would like to install Kali on a virtual machine. However, on the official website, I see two options: "Installer images" and "Virtual machines"....

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.