473,396 Members | 2,018 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,396 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.

VAL
Nov 21 '05 #1
2 11788

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

Gaidar

"Val3" <va****@NOSPAMcambieri.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.

VAL

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 :(
Or
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.

Robert

------------------------------------------------------
Imports System.ServiceProcess

Public Class Service1
Inherits System.ServiceProcess.ServiceBase

#Region " Component Designer generated code "

Public Sub New()
MyBase.New()

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

' 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
components.Dispose()
End If
End If
MyBase.Dispose(disposing)
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
NNTP-Posting-Host: 80.180.145.35
X-Complaints-To: "Please send abuse reports to ab***@tin.it and technical notifications to ne********@tin.it"
X-Trace: news4.tin.it 1110634026 80.180.145.35 (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.

VAL

Nov 21 '05 #3

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

Similar topics

1
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
1
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...
2
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...
2
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...
5
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...
2
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...
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...
0
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...
3
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,
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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...
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,...

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.