Windows 4GL frame on top

From: rhh@tachy.uah.ualberta.ca (Roy Hann)
Subject: Re: ingresw4gl:  Always_On_Top attribute

Jeff.Robbins@comm.hq.af.mil (Jeff Robbins) writes:
: Is it possible to set a called frame so that it will remain on top,
: even if the calling frame is clicked on?
: My code is something like this
: 
: callframe ChildFrame(a = byref(A),...)
: 
: Because I am passing values by reference I cannot 
: not use the gotoframe statement.
: 
: I know that all windows in MS_Windows have an attribute
: called AlwaysOnTop or something like that.
: 
: Can Ingres/W4GL set this value?

No!  And it is an abiding pain in the butt.  In fact it has probably 
cost some of us some business.

The ability to make windows modal is included in an omnibus SIR, 
#49884.  I suggest you, and all your friends and relations, get into 
ProAlert and vote on it.  (After the notorious Daylight-Saving Time
"feature", this has to be one of my top 3 gripes with INGRES.)

(Maybe W4GL 3.0 delivers this?)

--Roy Hann




In message <3bvnam$s9m@hq.hq.af.mil> - Jeff.Robbins@comm.hq.af.mil (Jeff Robbin
s) writes:
>Is it possible to set a called frame so that it will remain on top,
>even if the calling frame is clicked on?
>My code is something like this
>
>callframe ChildFrame(a = byref(A),...)
>
>Because I am passing values by reference I cannot 
>not use the gotoframe statement.
>
>I know that all windows in MS_Windows have an attribute
>called AlwaysOnTop or something like that.
>
>Can Ingres/W4GL set this value?
>

Not that I know of but the following code snippet will emulate this.

INITIALIZE () =
BEGIN
    CurFrame.SendUserEvent (EventName='BringToFront', Delay=2);
END;

ON USEREVENT 'BringToFront' =
BEGIN
    CurFrame.BringToFront();
    CurFrame.SendUserEvent (EventName='BringToFront', Delay=2);
END;


Regards

David

David L. Tondreau, Jr. |    ars_mgr@nhqvax.hq.nasa.gov   | Don't "Just do it."
Managing Consultant    | d_tondreau@aeromail.hq.nasa.gov | Do it right.
LCT, Inc.              |         (202) 554-0115          | The first time.




Roy Hann (rhh@tachy.uah.ualberta.ca) wrote:
: Jeff.Robbins@comm.hq.af.mil (Jeff Robbins) writes:
: : Is it possible to set a called frame so that it will remain on top,
: : even if the calling frame is clicked on?
: : Can Ingres/W4GL set this value?

: No!  And it is an abiding pain in the butt.  In fact it has probably 
: cost some of us some business.

It is possible if you create a 3GL DLL with a Windows C compiler
like Microsoft Visual C++. You can pass the title of the frame
to a C function, get a window handle, and either use SysModalWindow
to let the window have the entire screen to itself (no other actions
possible) or you could put it "Always On Top" (like you can with the
Windows Clock applet). It's a bit of a hassle to create a DLL just
right, but the required Windows C code is only about five lines long.

--
Rene Baart                              |          
Amstelveen, The Netherlands             | baart@simplex.nl
Ingres Q & A
To William's Home Page

© William Yuan 2000

Email William