
Quote from Talker on November 14, 2021, 6:11 pmThanks,
Is there a function in Neo that will activate the previous window?
Right now I have this sort of working (want to avoid the AutoIT GPL license):
zmGetForegroundWindow "[MyWinHandle]"
hpwSetTransparent "[MyWinHandle]" "50"However, that applies transparency to the Neo app itself, since that's the top window when being launched :-(.
I want to apply transparency to the window that was active before the Neo app was launched.
Is this possible?
Thanks,
Is there a function in Neo that will activate the previous window?
Right now I have this sort of working (want to avoid the AutoIT GPL license):
zmGetForegroundWindow "[MyWinHandle]"
hpwSetTransparent "[MyWinHandle]" "50"
However, that applies transparency to the Neo app itself, since that's the top window when being launched :-(.
I want to apply transparency to the window that was active before the Neo app was launched.
Is this possible?

Quote from Vadim on November 15, 2021, 8:15 pm@talker
I want to apply transparency to the window that was active before the Neo app was launched.
Is this possible?
This is possible if your other application monitors the top windows in the system and, for example, writes their handles (or names) to a file that your main application can read after starting. Then the last entry in the file would be the desired descriptor.
Or your program needs a plugin that can read the existing windows queue in Windows (if I understand correctly, this is called "z-order of open windows").
You can also try to send ALT+TAB to the desktop after your program window is loaded to activate the previous window in the system and apply transparency to it, then immediately make the top window of your application in the system. I haven't tried it, I don't know how it would work. You can check it out.
There are probably other ways.
I want to apply transparency to the window that was active before the Neo app was launched.
Is this possible?
This is possible if your other application monitors the top windows in the system and, for example, writes their handles (or names) to a file that your main application can read after starting. Then the last entry in the file would be the desired descriptor.
Or your program needs a plugin that can read the existing windows queue in Windows (if I understand correctly, this is called "z-order of open windows").
You can also try to send ALT+TAB to the desktop after your program window is loaded to activate the previous window in the system and apply transparency to it, then immediately make the top window of your application in the system. I haven't tried it, I don't know how it would work. You can check it out.
There are probably other ways.

Quote from Talker on November 15, 2021, 11:02 pmI tried Alt+Tab (and Alt+Esc) with separate executables which usually works in these cases but here it doesn't :-(.
I think it might work if Neo could send Alt+Tab globally (so not addressed to any specific window handle/title).
The other two solutions seem a little bit complex...
Nevermind, thanks for the help.
I tried Alt+Tab (and Alt+Esc) with separate executables which usually works in these cases but here it doesn't :-(.
I think it might work if Neo could send Alt+Tab globally (so not addressed to any specific window handle/title).
The other two solutions seem a little bit complex...
Nevermind, thanks for the help.

Quote from Vadim on November 20, 2021, 9:04 pm@talker
Here is an example where pressing the button makes the previous window in the system semi-transparent (the Alt+Tab key combination is passed to Windows Explorer with the standard SendKeys command).
The plugins used are hpwSendKeys, zmFunctions.
Subroutine text:
:SendKeys
.to switch to the previous window with the keys
SendKeys "C:\Windows\System32\explorer.exe" "{AltDn}{Tab}{Tab}{AltUp}"
.get the top window descriptor in the system
zmGetForegroundWindow "[HWND]"
.set the window transparency (0 - fully transparent, 100 - not transparent)
hpwSetTransparent "[HWND]" "[TrackBar1]"
ReturnRun a test compilation of the project. Then select the degree of transparency with the slider, where 100 is opaque and 0 is fully transparent. Then click on the button. Then select another value of the slider and press the button again. You can do this as many times as you like :)
Here is an example where pressing the button makes the previous window in the system semi-transparent (the Alt+Tab key combination is passed to Windows Explorer with the standard SendKeys command).
The plugins used are hpwSendKeys, zmFunctions.
Subroutine text:
:SendKeys
.to switch to the previous window with the keys
SendKeys "C:\Windows\System32\explorer.exe" "{AltDn}{Tab}{Tab}{AltUp}"
.get the top window descriptor in the system
zmGetForegroundWindow "[HWND]"
.set the window transparency (0 - fully transparent, 100 - not transparent)
hpwSetTransparent "[HWND]" "[TrackBar1]"
Return
Run a test compilation of the project. Then select the degree of transparency with the slider, where 100 is opaque and 0 is fully transparent. Then click on the button. Then select another value of the slider and press the button again. You can do this as many times as you like :)
Uploaded files:
Quote from Talker on November 21, 2021, 6:02 amHi Vadim,
Thanks for giving this a try. I really appreciate it!
However, it is not working on my system. I tried several Explorer windows and other applications as well, but none of the windows are responding...
It could be related to some focus (Z order) issues I've been having with Windows 11. I have a dual-boot system including Windows 10. So I will try it on that OS tomorrow as well.
Meanwhile, if others would like to give this a try. Please let us know the results.
Hi Vadim,
Thanks for giving this a try. I really appreciate it!
However, it is not working on my system. I tried several Explorer windows and other applications as well, but none of the windows are responding...
It could be related to some focus (Z order) issues I've been having with Windows 11. I have a dual-boot system including Windows 10. So I will try it on that OS tomorrow as well.
Meanwhile, if others would like to give this a try. Please let us know the results.

Quote from Vadim on November 21, 2021, 8:08 am@talker
Check also the path to explorer.exe, it is possible that on your system it is in a different folder (I have not checked it).
Check also the path to explorer.exe, it is possible that on your system it is in a different folder (I have not checked it).

Quote from Talker on November 21, 2021, 11:07 pmIt's still not working, even though I changed the path (I should've known that since I'm using 64-bit system) to:
C:\Windows\SysWOW64\explorer.exe
Are you using Windows 7 32-bit?
It's still not working, even though I changed the path (I should've known that since I'm using 64-bit system) to:
C:\Windows\SysWOW64\explorer.exe
Are you using Windows 7 32-bit?
Quote from mishem on November 22, 2021, 2:04 amThere is a global variable that should work the same on any system.
[WindowsDir]explorer.exe
In such cases, put an exclamation mark in front of the path ! Sometimes the system surprises and fails to find the file even though the path is spelled correctly.
SendKeys "!C: \ Windows \ System32 \ explorer.exe" "{AltDn} {Tab} {Tab} {AltUp}".
There is a global variable that should work the same on any system.
[WindowsDir]explorer.exe
In such cases, put an exclamation mark in front of the path ! Sometimes the system surprises and fails to find the file even though the path is spelled correctly.
SendKeys "!C: \ Windows \ System32 \ explorer.exe" "{AltDn} {Tab} {Tab} {AltUp}".

Quote from Talker on November 22, 2021, 4:57 amThanks Mishem, I tried this as well but I'm still getting zero effect when moving the slider...
Is this project working properly on your system?
Thanks Mishem, I tried this as well but I'm still getting zero effect when moving the slider...
Is this project working properly on your system?

Quote from Talker on November 22, 2021, 5:16 amI don't see anything in TrackBar Properties - TrackBar1
Shouldn't there be something in the Value Changed or Value Changing events?
I don't see anything in TrackBar Properties - TrackBar1
Shouldn't there be something in the Value Changed or Value Changing events?

Quote from Vadim on November 22, 2021, 6:23 am@talker
Hi! The code is in the Subprograms tab (you can open it by pressing F12, in the project editing mode, not in the compilation mode). This subprogram is called with the button. And the slider allows you to change the value of the variable that is used in the subroutine to specify the degree of transparency.
Yes, I have 32bit at the moment.
Hi! The code is in the Subprograms tab (you can open it by pressing F12, in the project editing mode, not in the compilation mode). This subprogram is called with the button. And the slider allows you to change the value of the variable that is used in the subroutine to specify the degree of transparency.
Yes, I have 32bit at the moment.
Quote from mishem on November 22, 2021, 1:58 pmThat's how it works for me. But be careful. If the program crashes or hangs, you will be left with transparent windows.
The hpwControl plugin is also required.
That's how it works for me. But be careful. If the program crashes or hangs, you will be left with transparent windows.
The hpwControl plugin is also required.

Quote from Talker on November 22, 2021, 7:02 pmVery nice! This appears to work.
For testing purposes I advise to run the compiled executable instead of debugging the script from within Visual Neo (which apparently was a little bit too much for my graphics card to handle because I got a whole string of pointers on the screen when I moved the mouse).
Interesting sample project for sure. I'm going to study this some more.
Very nice! This appears to work.
For testing purposes I advise to run the compiled executable instead of debugging the script from within Visual Neo (which apparently was a little bit too much for my graphics card to handle because I got a whole string of pointers on the screen when I moved the mouse).
Interesting sample project for sure. I'm going to study this some more.

Quote from mishem on November 22, 2021, 9:09 pm(which apparently was a little bit too much for my graphics card to handle because I got a whole string of pointers on the screen when I moved the mouse)
When the timer is running, minimize the debugger, or switch to the Variables tab.
(which apparently was a little bit too much for my graphics card to handle because I got a whole string of pointers on the screen when I moved the mouse)
When the timer is running, minimize the debugger, or switch to the Variables tab.

Quote from fkapnist on January 10, 2022, 10:40 pmHowever, that applies transparency to the Neo app itself, since that's the top window when being launched :-(. I want to apply transparency to the window that was active before the Neo app was launched.I wonder if you minimize your app, apply transparency to whatever the top window is, and then restore your app... would that work?
However, that applies transparency to the Neo app itself, since that's the top window when being launched :-(. I want to apply transparency to the window that was active before the Neo app was launched.
I wonder if you minimize your app, apply transparency to whatever the top window is, and then restore your app... would that work?

Quote from rcohen on January 10, 2022, 10:55 pmHi @fkapnist,
WinTricks has this function. Not just last window, but ANY window
https://zmware.rcmediaservices.net/zmwwintricks/
Hi @fkapnist,
WinTricks has this function. Not just last window, but ANY window

Quote from Talker on January 28, 2022, 6:50 pmHi rcohen,
I tried the zmwWinTricks demo (nice video by the way), but sadly it does not seem to work on the last active window. You really need to designate a window handle or title....The "Leave empty for last active window handle" function in the sample project does not seem to work.
Can you post a simpler sample project for WinTricks (need not have any buttons at all) that does nothing but apply transparency (let's say value 120) to whichever window was active prior to launching the app? Preferably also without the need to place the mouse pointer in that window (after all, you can have an active window without the mouse pointer in it).
If it works, I will be more than happy to buy the plug-in.
Hi rcohen,
I tried the zmwWinTricks demo (nice video by the way), but sadly it does not seem to work on the last active window. You really need to designate a window handle or title....The "Leave empty for last active window handle" function in the sample project does not seem to work.
Can you post a simpler sample project for WinTricks (need not have any buttons at all) that does nothing but apply transparency (let's say value 120) to whichever window was active prior to launching the app? Preferably also without the need to place the mouse pointer in that window (after all, you can have an active window without the mouse pointer in it).
If it works, I will be more than happy to buy the plug-in.