Improve company productivity with a Business Account.Sign Up

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 158
  • Last Modified:

VB 6: Events to start as a Service

Greetings,

I've been spending the last few days trying to write a VB 6 exe so it will work as a service.

I've gotten it installed and setup up as a service, but when the service is started, the exe doesn't start like it would if you double clicked on the exe.

Is there a event that triggers when you run start it as a service?
0
Timelib
Asked:
Timelib
  • 3
  • 2
1 Solution
 
hesCommented:
Look here on how to get a vb app running as a service
http://msdn.microsoft.com/library/techart/msdn_ntsrvocx.htm 
More instructions and the compiled version is here

http://www.geocities.com/SiliconValley/Pines/3991/ntsvcocx.html 
0
 
TimelibAuthor Commented:
Ok, that is a nice way to work out the NT Service coding. It would be what I want, but I don't want to use a form.

I've tried to reference it, but it fails to start the service.

Any ideas on a known form needed way?
0
 
hesCommented:
I have quite a few apps running as services using the ntsrvocx with the form set to not visable.
0
Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

 
anthony_glenwrightCommented:
You can also have a look at the NT service toolkit from desaware - www.desaware.com
0
 
TimelibAuthor Commented:
Ah, ok I guess making the only form invisiable is exceptable.

However, once I have it installed as a service. How do I get it to start running my program?

The NTSVC.oxc is a create help in setting up the Service interface, but what do I use to have the program run without having to start it at NTService.ServiceStart?
0
 
TimelibAuthor Commented:
Ah found out how, made a timer on the form run my program after it started.

The NTSVC.ocx is create, easy. And making the form invisable allows the service to run nicely. Thanks.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now