Board index » delphi » Run program invisible

Run program invisible

Hi out there, I've a little program for windows which is a
Object(TEditWindow). I want this program to be invisble and have a
constructor like this:

CONSTRUCTOR TMyEditWindow.Init(AParent : PWindowsObject;ATitle :
PChar);
BEGIN
  inherited Init(APArent,ATitle);
 { decide if hide or not here }
  IF not ShowIt THEN BEGIN
    attr.Style:=attr.Style and not ws_Visible; { Hide window }
    Editor^.Attr.Style:=Editor^.Attr.Style and not ws_Visible; { hide
editor window }
END;

The problem is: the editor window is hidden but not the main window.
How can I hide it?
I've tried ShowWindow(HWindow,sw_hide) in the SetupWindow-Method but
then it's visible for a very short time.....

 

Re:Run program invisible


Ulli Conrad <uconr...@gwdg.de> wrote in article
<33c5e9bc.5244...@news.gwdg.de>...

Quote
> Hi out there, I've a little program for windows which is a
> Object(TEditWindow). I want this program to be invisble and have a
> constructor like this:

> CONSTRUCTOR TMyEditWindow.Init(AParent : PWindowsObject;ATitle :
> PChar);
> BEGIN
>   inherited Init(APArent,ATitle);
>  { decide if hide or not here }
>   IF not ShowIt THEN BEGIN
>     attr.Style:=attr.Style and not ws_Visible; { Hide window }
>     Editor^.Attr.Style:=Editor^.Attr.Style and not ws_Visible; { hide
> editor window }
> END;

> The problem is: the editor window is hidden but not the main window.
> How can I hide it?
> I've tried ShowWindow(HWindow,sw_hide) in the SetupWindow-Method but
> then it's visible for a very short time.....

        Did you call ShowWindow(...) before or after calling
        inherited SetupWindow? The order can matter.

--
Hilton Evans
***********************************************************
The two most important things in life are personal
health and time ... H.Evans 1995
**********************************************************
Chempen+ Chemical Structure Drawing
Software for Windows
http://www.ici.net/cust_pages/hfevans/chempen.htm

Re:Run program invisible


On 12 Jul 1997 22:36:50 GMT, "Hilton Evans" <hfevansNOS...@ici.net>
wrote:

Quote
>    Did you call ShowWindow(...) before or after calling
>    inherited SetupWindow? The order can matter.

Hi Hilton, I've call it after the inherited SetupWindow, but calling
it before doesn't work.... The Problem is the same.
Hey, I've thought that HWindow is initialized in that inherited
SetupWindow....
Regards - Ulli -

Other Threads