How to convert a regular VB app into a service to run on a Windows 2003 server?

  • Thread starter Thread starter Bill Nguyen
  • Start date Start date
B

Bill Nguyen

I have a small VB app that I would like to install as a service in 1 of our
Win 03 servers.
Any suggestion is geatly appreciated.

Bill
 
Bill said:
I have a small VB app that I would like to install as a service in 1 of our
Win 03 servers.
Any suggestion is geatly appreciated.

Bill

A little to general Bill... What kind of application is it? Is it a
windows forms application? Is it a console application? I am assuming
it is in VB.NET...

The main thing is that services really shouldn't have a GUI. If you
really want to do this, I would separate out the important logic into 1
or more class libraries and then reference them from your vb app and
your windows service project.
 
It's a win form app with a single form.
..
I can move the routines out of the GUI to a module.

Please tell me the next steps to take.

Thanks a million

Bill
 
Bill said:
It's a win form app with a single form.
.
I can move the routines out of the GUI to a module.

Please tell me the next steps to take.

Thanks a million

Bill

I would move it out to a class library, and then create a windows
service project and reference the library (you would reference it from
your windows form project as well). There are examples in the
documentation, but the basics are that you need to create a class that
inherits from System.SericeProcess.ServiceBase.
 
I wrote a service using VB.Net called SpamGrinderProxy. It's open source and
can be downloaded from Sourceforge:
http://spamgrinderprox.sourceforge.net/

If you're willing to peruse the code, it should give you an idea of how to write
a service.

Bill Nguyen said:
It's a win form app with a single form.
.
I can move the routines out of the GUI to a module.

Please tell me the next steps to take.

Thanks a million

Bill
 
Back
Top