Hi all,
I've launched a program hidden, but when using SetFocus to send some keys to it, it is visible again. So I've used a code I've found here to make it's window transparent, it works. But the window is still visible in taskbar.
How to make a window not visible in taskbar ?
I've searched about it and found it's possible by doing something like :
LibFunc>user32,SetWindowLongA,handle,-20,0x80
http://forum.pcsoft.fr/thread.awp?group ... tid=195368
http://source.winehq.org/WineAPI/SetWindowLongA.html
I'm not programmer, can someone help ? Thanks.
Window not visible in taskbar !
Moderators: Dorian (MJT support), JRL
Window not visible in taskbar !
Last edited by Okapi on Sun Apr 03, 2011 10:04 pm, edited 1 time in total.
Hi Okapi and all,
That's an interesting question... sorry I don't have an answer... though I did take a look at the first link you provided... but its a forum post in French. Here's that same page only translated into English:
http://babelfish.yahoo.com/translate_ur ... =Translate
Take care
That's an interesting question... sorry I don't have an answer... though I did take a look at the first link you provided... but its a forum post in French. Here's that same page only translated into English:
http://babelfish.yahoo.com/translate_ur ... =Translate
Take care
jpuziano
Note: If anyone else on the planet would find the following useful...
[Open] PlayWav command that plays from embedded script data
...then please add your thoughts/support at the above post -
Note: If anyone else on the planet would find the following useful...
[Open] PlayWav command that plays from embedded script data
...then please add your thoughts/support at the above post -
Two things: first you need a result variable (see HELP FOR LIBFUNC). Second the "0x80" is in hex and Libfunc> wants to see that converted to decimal so you need to use "128" instead.LibFunc>user32,SetWindowLongA,handle,-20,0x80
So your libfunc line will look like:
LibFunc>user32,SetWindowLongA,SWLres,handle,-20,128
According to the Microsoft website this style is to make the application window a tool window.
This might not appeal to you but there is only one other style option mentioned and it will probably appeal to you less.Microsoft wrote:The window is intended to be used as a floating toolbar. A tool window has a title bar that is shorter than a normal title bar, and the window title is drawn using a smaller font. A tool window does not appear in the taskbar or in the dialog that appears when the user presses ALT+TAB. If a tool window has a system menu, its icon is not displayed on the title bar. However, you can display the system menu by right-clicking or by typing ALT+SPACE.
The WS_EX_NOACTIVATE style:
To see what WS_EX_NOACTIVATE looks like, change the "128" at the end of the LibFunc line to "134217728" The first thing you'll notice is that you cannot set focus to the application window. But there won't be a taskbar entry.Microsoft wrote:A top-level window created with this style does not become the foreground window when the user clicks it. The system does not bring this window to the foreground when the user minimizes or closes the foreground window.
To activate the window, use the SetActiveWindow or SetForegroundWindow function.
The window does not appear on the taskbar by default. To force the window to appear on the taskbar, use the WS_EX_APPWINDOW style.
Here's a sample using notepad.
Code: Select all
Let>RP_WINDOWMODE=0
Run>notepad.exe
WWO>notepad*
GetWindowHandle>Notepad*,handle
LibFunc>user32,SetWindowLongA,SWLres,handle,-20,128
MDL>Pick Ok to set focus to the toolbarred Notepad
SetFocus>Notepad*
Hmmmm.
After looking at this a bit it would seem that the best option might be to use SetWindowLongA with the WS_EX_NOACTIVATE style, then use Microsoft's SetForegroundWindow function. See the following example. This gives me a normal notepad window with no taskbar entry.
After looking at this a bit it would seem that the best option might be to use SetWindowLongA with the WS_EX_NOACTIVATE style, then use Microsoft's SetForegroundWindow function. See the following example. This gives me a normal notepad window with no taskbar entry.
Code: Select all
Let>RP_WINDOWMODE=0
Run>notepad.exe
WWO>notepad*
GetWindowHandle>Notepad*,handle
LibFunc>user32,SetWindowLongA,SWLres,handle,-20,134217728
MDL>Pick Ok to set focus to no taskbar Notepad
LibFunc>user32,SetForegroundWindow,SFWres,handle
SetFocus>Notepad*