Link to home
Start Free TrialLog in
Avatar of Timelib
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?
ASKER CERTIFIED SOLUTION
Avatar of hes
hes
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Timelib
Timelib

ASKER

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?
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
Avatar of Timelib

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?
Avatar of Timelib

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.