Solved

inherit from Object that inherit from TService

Posted on 2002-07-07
5
290 Views
Last Modified: 2010-04-04
hi
i build a service shell that launch, close and detect when the application was closed (by process list), This shell inherit from TService (Service application wizard).
In my project i use this for 2 application can i do this generic?
i have the following code:

TGenericServiceShell = class(TService)
.
.
and
TMyService = class(TGenericServiceShell)

MyService unit was created by using ‘Service application’ wizard,  I changed the inheritance from TService to TgenericServiceShell, and then when closing the project and load it again i get an error about name missing, the service main form replaced with another one and the service doesn't work.

Thanks,
udi
0
Comment
Question by:udic
  • 3
  • 2
5 Comments
 
LVL 8

Expert Comment

by:TOndrej
ID: 7137391
You are trying to use form inheritance (because TService comes with a data module).
In that case, make sure the following is true:

The ancestor unit is part of your project.
The descendant's .dfm begins with 'inherited' keyword instead of 'object'.

You can achieve this at design time with File\New\Other... in your project tab, select ancestor, Inherit.

HTH
TOndrej
0
 

Author Comment

by:udic
ID: 7137806
i didn't success.how can i do this?
0
 
LVL 8

Accepted Solution

by:
TOndrej earned 75 total points
ID: 7138073
What's the problem? Is anything in my previous post unclear? Feel free to ask.
0
 

Author Comment

by:udic
ID: 7138159
sorry
Thank you i success, its work great

thanks alot
udi
0
 
LVL 8

Expert Comment

by:TOndrej
ID: 7138183
I'm glad that it helped you.
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

820 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question