Article View: borland.public.cppbuilder.nativeapi
Article #1130Re: Open a Form in a TServiceApplication during ServiceStart
From: Bruce Salzman
Date: Thu, 25 Oct 2007 16:50
Date: Thu, 25 Oct 2007 16:50
30 lines
1873 bytes
1873 bytes
"Marc" <info@mawnet.com> wrote in message news:4720c4bf@newsgroups.borland.com... > Hi all > > Here we go: > > 1) I create a simple TServiceApplication using the designer in BCB6. > > 2) Then I add the two events ServiceStart and ServiceStop to respond to the > service manager. > > 3) I install the service, start it, stop it, no problems :-) > > 4) Now I create a blank form and display [MyForm->Show()] it in the > ServiceStart event. > > 5) Again I install the service, start it, stop it, no problems :-) > > 6) Now I add a Button to my form, no events behind. > > 5) Again I install the service, start it, stop it => it crashes with the > error EOSError, Code: 1400 Invalid Window Handle. > Does Auto-creation of Forms work in a service? I'd try creating the Form with new in the constructor. -- Bruce
Technical Details
Message-ID:
<4720c961$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news2.google.com!news1.google.com!news.glorb.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mailReferences:
<4720c4bf@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,8191050f071867e7 X-Google-Attributes: gid10cc67,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit From: " Bruce Salzman" <bruce@nospam.org> Newsgroups: borland.public.cppbuilder.nativeapi References: <4720c4bf@newsgroups.borland.com> In-Reply-To: <4720c4bf@newsgroups.borland.com> Subject: Re: Open a Form in a TServiceApplication during ServiceStart Date: Thu, 25 Oct 2007 11:50:43 -0500 Lines: 31 MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="iso-8859-1"; reply-type=response Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Windows Mail 6.0.6000.16480 X-MIMEOLE: Produced By Microsoft MimeOLE V6.0.6000.16545 NNTP-Posting-Host: 67.52.3.150 Message-ID: <4720c961$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1193331041 67.52.3.150 (25 Oct 2007 09:50:41 -0700) Path: arc1-ca.pugleaf.net!g2news2.google.com!news1.google.com!news.glorb.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail