Jump to content

Recommended Posts

Posted

How can I apply the style $WS_EX_TOOLWINDOW to a regular window, such as firefox?

If that isn't possible, how can i set it on to and remove the item from the taskbar?

Posted (edited)

Im sorry, Im kinda new here at this.

Could you post the code that would do the entire thing? Its confusing for me :)

Edited by SBrown
Posted

Im sorry, Im kinda new here at this.

Could you post the code that would do the entire thing? Its confusing for me :)

#include <Constants.au3>
#include <WindowsConstants.au3>
#include <WinAPI.au3>

$hWnd = WinGetHandle("Your window title", "Your window text")
$newStyle = $WS_EX_TOOLWINDOW
$oldStyle = _WinAPI_GetWindowLong($hWnd, $GWL_EXSTYLE)
_WinAPI_SetWindowLong($hWnd, $GWL_EXSTYLE, BitOR($oldStyle, $newStyle))
Posted

#include <Constants.au3>
#include <WindowsConstants.au3>
#include <WinAPI.au3>

$hWnd = WinGetHandle("Your window title", "Your window text")
$newStyle = $WS_EX_TOOLWINDOW
$oldStyle = _WinAPI_GetWindowLong($hWnd, $GWL_EXSTYLE)
_WinAPI_SetWindowLong($hWnd, $GWL_EXSTYLE, BitOR($oldStyle, $newStyle))

Thanks, but the window goes smaller, like the style does, but it isnt topmost, nor out of the taskbar

Posted

I have seen some trick with setting parent to desktop window:

#include <Constants.au3>
#include <WindowsConstants.au3>
#include <WinAPI.au3>

$hWnd = WinGetHandle("Your window title", "Your window text")
$parent = _WinAPI_GetDesktopWindow()
_WinAPI_SetParent($hWnd, $parent)

But it seems to not work too. Search forum. I'm sure there is answer for your question already.

Posted

Looking on msdn, i found WS_EX_APPWINDOW, which keeps the window in the bar, how do i subtract that now?

Try this:

#include <Constants.au3>
#include <WindowsConstants.au3>
#include <WinAPI.au3>

$hWnd = WinGetHandle("Your window title", "Your window text")
$oldStyle = _WinAPI_GetWindowLong($hWnd, $GWL_EXSTYLE)
$newStyle = BitOR($oldStyle, $WS_EX_TOOLWINDOW)
$newStyle = BitAND($newStyle, BitNOT($WS_EX_APPWINDOW))
_WinAPI_SetWindowLong($hWnd, $GWL_EXSTYLE, $newStyle)
Posted

Try this:

#include <Constants.au3>
#include <WindowsConstants.au3>
#include <WinAPI.au3>

$hWnd = WinGetHandle("Your window title", "Your window text")
$oldStyle = _WinAPI_GetWindowLong($hWnd, $GWL_EXSTYLE)
$newStyle = BitOR($oldStyle, $WS_EX_TOOLWINDOW)
$newStyle = BitAND($newStyle, BitNOT($WS_EX_APPWINDOW))
_WinAPI_SetWindowLong($hWnd, $GWL_EXSTYLE, $newStyle)
nope dosnt work

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...