?
Solved

inherit from Object that inherit from TService

Posted on 2002-07-07
5
Medium Priority
?
293 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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 300 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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
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…
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…
Suggested Courses

764 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