YOUR THE MAN!!! Thank you very much!




>From: Robert Loof <[EMAIL PROTECTED]>
>Reply-To: [EMAIL PROTECTED]
>To: Multiple recipients of list delphi <[EMAIL PROTECTED]>
>Subject: Re: [DUG]:  Embedded forms from a DLL
>Date: Tue, 07 Mar 2000 03:02:48 +1300
>
>Hi Peter,
>
> > function TAITest.Show: Integer;
> > begin
> >   if not Assigned(Ffrm) then
> >   begin
> >     Ffrm := TfrmTest.Create(Application);
> >     Ffrm.Parent := ShellServer.GetShellWindow.GetAddInWorkSpace;
> >     Ffrm.Align := alClient;
> >     Ffrm.BorderStyle := bsNone;
> >     Ffrm.WindowState := wsMaximized;
> >   end;
> >   Ffrm.Show;
> > end;
> >
> > It works fine - except that the form is invisible.  If I take out the
> > setting of Parent, I can see the form but it's floating outside of the 
>main
> > shell space window.  If this code is all in one app then it works fine.
> >
> > Anyone got any ideas or done anything similar themselves?
>
>For embedded forms use an alternative TForm constructor:
>CreateParented(SomeWindowHandle)
>
>function TAITest.Show: Integer;
>begin
>   if not Assigned(Ffrm) then
>   begin
>     Ffrm :=
>TfrmTest.CreateParented(ShellServer.GetShellWindow.GetAddInWorkSpace.Handle);
>     Ffrm.Align := alClient;
>     Ffrm.BorderStyle := bsNone;
>     Ffrm.WindowState := wsMaximized;
>     Ffrm.Visible := True;
>   end;
>end;
>
>
>Cheers,
>
>Robert
>
>--------------------------------------------
>Robert Loof, WebCentre Ltd and Phasis Ltd, Christchurch, New Zealand
>
>- Web automation for online periodicals: http://TurboPress.com
>---------------------------------------------------------------------------
>     New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
>                   Website: http://www.delphi.org.nz

______________________________________________________
Get Your Private, Free Email at http://www.hotmail.com

---------------------------------------------------------------------------
    New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
                  Website: http://www.delphi.org.nz

Reply via email to