Timelib
asked on
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?
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?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
I have quite a few apps running as services using the ntsrvocx with the form set to not visable.
You can also have a look at the NT service toolkit from desaware - www.desaware.com
ASKER
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?
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?
ASKER
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.
The NTSVC.ocx is create, easy. And making the form invisable allows the service to run nicely. Thanks.
ASKER
I've tried to reference it, but it fails to start the service.
Any ideas on a known form needed way?