custom window on top of "always on top app"

General questions about NeoBook

Moderator: Neosoft Support

Locked
yanzco
Posts: 192
Joined: Sun Jul 20, 2014 4:07 am

custom window on top of "always on top app"

Post by yanzco »

hello, i have 2 neobook apps..
1 on upper top that displays critical information : let's call this "upper half app"
and the second app on the lower half... : let's call this "lower half app"

the upper app window size is smaller. and is set to always on top window..
while the second app is the main app where all the buttons exist and is set to fullscreen... this means the lower half app is also the background..
and the upper half is always on top of it displaying information..

it's working perfectly...


now on the lower half.. when i press a button that displays a custom window..
the upper half app that is set to always on top does it's job to display itself always on top too well..
bad thing is, custom windows created by the lower half app, has its custom window partly hidden by the upper app..

is there a way i can bypass the always on top upper half app ?

see image for details :
https://imgur.com/a/bgFr6
User avatar
HPW
Posts: 2571
Joined: Fri Apr 01, 2005 11:24 pm
Location: Germany
Contact:

Re: custom window on top of "always on top app"

Post by HPW »

Hello,
Why do you not position your custom window relativ to the lowerhalf app so it get displayed there?
Regards
Hans-Peter
User avatar
Gaev
Posts: 3782
Joined: Fri Apr 01, 2005 7:48 am
Location: Toronto, Canada
Contact:

Re: custom window on top of "always on top app"

Post by Gaev »

yanzco:

1) If the height of the custom window is small enough to fit below the "upper app", you can control its position (relative to the top left corner of the "lower app") so it is not centered over the "lower app" ...from the Help file ...

CustomWindow "title" "left" "top" "object name" "options"

title
The text that will appear in the window’s title bar (if it has one).

left, top
The coordinates for the window’s left, top corner relative to the upper left of the publication window. Enter “-1” for both to center the window on the screen.
2) Otherwise, assuming you have established your own protocol to communicate from "lower app" to "upper app", you could send a message to the "lower app" for it to mimimize itself just before you invoke the CustomWindow command...

Code: Select all

SetVar "[WindowState]" "Minimized"
... and restore it just before you close it ...

Code: Select all

:Container1_OnClose 
... send message to "upper app" to do a SetVar "[WindowState]" "Maximized"
Return
yanzco
Posts: 192
Joined: Sun Jul 20, 2014 4:07 am

Re: custom window on top of "always on top app"

Post by yanzco »

yea, some smaller custom windows i can place it below the upper app...

but some custom windows are just too big...
and minimizing the upper app leaves an ugly blank space at the background.. but it could work..

i have not established any communications between the 2 apps..
but how can i have them communicate or send variables or action commands if i may ask? :)

@Gaev's suggestion changing windowstate...
i think i can just change the upper app's [WindowOrder] to Normal and when the custom window closes.. change it back again to OnTop
User avatar
Gaev
Posts: 3782
Joined: Fri Apr 01, 2005 7:48 am
Location: Toronto, Canada
Contact:

Re: custom window on top of "always on top app"

Post by Gaev »

yanzco:
i have not established any communications between the 2 apps..
but how can i have them communicate or send variables or action commands if i may ask?
From your description, I assumed that you had some form of communication between the Apps; perhaps you can tell us why you have this unusual setup consisting of two apps ... e.g. could you have designed the "upper app' as an "always on Custom Window" in the 'lower app" ?

But to answer your question, one option could be to use the CommandLine_OnChange subroutine to check for the value of [CommandLine] ... and in the "lower app", do a Run of the "upperapp" with the requested action being passed as a run option; you can read all about how the subroutine/variable work in the Help file (do a search for CommandLine).
yanzco
Posts: 192
Joined: Sun Jul 20, 2014 4:07 am

Re: custom window on top of "always on top app"

Post by yanzco »

the upper app is just a table of database that needs updating with the totals, sums etc.. every 30 seconds...
and the loops has become a bit makign the original app a bit slow..
so i just created a new app so it wont slow down the main app..

ill check out commandline.. :) thanks for the idea
Locked