Z Level question. You'd think LC would have this built in...
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
-
- Posts: 77
- Joined: Fri Jan 04, 2013 9:57 am
Z Level question. You'd think LC would have this built in...
I need one of my stacks to stay on bottom-most z level (right on the desktop). Right now I am using the default, which puts it at top whenever focused and allows it to wander through levels when not focused. I don't mind it wandering down levels; it's when it goes to the top that I have problems. It's a little annoying when this stack covers other windows and makes it impossible to get to them without needing to use the window switcher every time (yes, I am using Windows). There is no options for this in the window settings in LiveCode and I can't find any code that would do this for me, only an option to put at topmost z level, which is the opposite of what I am looking for. You'd think they would have included an option to keep the window at the bottom instead of the top, but I guess they overlooked that half of the settings. Maybe they just assumed that nobody would have a reason to use it.
I have already looked most everywhere for a solution, but nobody has one that works.
If anyone has anything that would prevent a stack from going up in z level when focused, it would be much appreciated.
I have already looked most everywhere for a solution, but nobody has one that works.
If anyone has anything that would prevent a stack from going up in z level when focused, it would be much appreciated.
Re: Z Level question. You'd think LC would have this built i
Set all your stacks to palette except the one you always want to be behind. Can't work on them in that mode.
to change a stack to palette mode
palette stack "stackname"
to change back to a mode where you can edit and change the controls and scripts
toplevel stack "stackname"
to change a stack to palette mode
palette stack "stackname"
to change back to a mode where you can edit and change the controls and scripts
toplevel stack "stackname"
Re: Z Level question. You'd think LC would have this built i
You can easily write an external to control the Z-level..
Re: Z Level question. You'd think LC would have this built i
Then you aren't trying 

Re: Z Level question. You'd think LC would have this built i
Did you try to hold your breath for 60 minutes? 

-
- Posts: 77
- Joined: Fri Jan 04, 2013 9:57 am
Re: Z Level question. You'd think LC would have this built i
I've already looked through some options for externals, but I couldn't find anything that works with my current program. Do you have any suggestions of some external option to force z leveling of my window? I think there's some small scripts that could do it, but I can't find them.shaosean wrote:You can easily write an external to control the Z-level..
Of course, it would be best if it was automatic so that I don't need to wait for the external to cycle each time. It would take only a fraction of a second, but it would cause a noticeable window flash every time I change windows.
Since I can't force the z level of non internal windows, forcing every other stack to top will not help very much. Other programs will still disappear behind mine.
Re: Z Level question. You'd think LC would have this built i
Code: Select all
Since I can't force the z level of non internal windows, forcing every other stack to top will not help very much. Other programs will still disappear behind mine.
Try iconizing the stack. That will get it out of your way.
PowerDebug http://powerdebug.ahsoftware.net
PowerTools http://www.ahsoftware.net/PowerTools/PowerTools.irev
PowerTools http://www.ahsoftware.net/PowerTools/PowerTools.irev
Re: Z Level question. You'd think LC would have this built i
I will write you one tonight..
Re: Z Level question. You'd think LC would have this built i
Sorry for the delay, just having a heck of time with Windows and Visual Studio but everything looks like it should be sorted out now, so will write it tonight for you..
-
- Posts: 77
- Joined: Fri Jan 04, 2013 9:57 am
Re: Z Level question. You'd think LC would have this built i
Iconizing the stack would only minimize it. I never said I wanted it minimized, just behind everything.mwieder wrote: Er... that's the way Windows is supposed to work.
Try iconizing the stack. That will get it out of your way.
I'm trying to get this one particular window to ignore focusing when selected. That's all.
Re: Z Level question. You'd think LC would have this built i
k.. either something is broken in windows or in rev, but i am over it.. if anyone here can actually build windows externals, the code to do the z-ordering is simple as MS has a command SetWindowPos which allows you to set the z-order.. i had written an external a couple decades back that gave Windows Rev the "always on top" feature, so i know the code works..
-
- VIP Livecode Opensource Backer
- Posts: 10058
- Joined: Sat Apr 08, 2006 7:05 am
- Contact:
Re: Z Level question. You'd think LC would have this built i
Is this for a kiosk? If so, this can easily be done from LiveCode on Linux with wmctrl installed. If not, why do you want that window to ignore the user's selection of it?
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
Re: Z Level question. You'd think LC would have this built i
This is the code that I was trying to get to compile (this is a quick rewrite as I am on my Mac again)..
Code: Select all
#include <stdlib.h>
#include <math.h>
#include <Windows.h>
#include <revolution/external.h>
void ssAlwaysOnBottom(char *p_arguments[], int p_argument_count, char **r_result, Bool *r_pass, Bool *r_err) {
*r_err = True;
*r_pass = False;
// check the parameter count
if (p_argument_count != 1) {
*r_result = strdup("err: incorrect number of parameters.");
goto Done;
}
// check the parameter to see if it is a valid windowID
HWND tWindowID = (HWND)atoi(p_arguments[0]);
if (!IsWindow(tWindowID)) {
*r_result = strdup("err: invalid window");
goto Done;
}
// try to move the window to the back
if (SetWindowPos(tWindowID, HWND_BOTTOM, 0, 0, 0, 0, SWP_NOACTIVATE | SWP_NOMOVE | SWP_NOOWNERZORDER | SWP_NOSENDCHANGING | SWP_NOSIZE)) {
*r_err = False;
goto Done;
} else {
*r_result = strdup("err: unable to set the window to always be on the bottom");
goto Done;
}
Done:
return;
} // end ssAlwaysOnBottom
EXTERNAL_BEGIN_DECLARATIONS("sszorder")
EXTERNAL_DECLARE_COMMAND("ssAlwaysOnBottom", ssAlwaysOnBottom)
EXTERNAL_END_DECLARATIONS
-
- Posts: 77
- Joined: Fri Jan 04, 2013 9:57 am
Re: Z Level question. You'd think LC would have this built i
Thanks for the replies. I will try to use this external.