Help - Search - Members - Calendar
Full Version: removal of "windows title bar"
Hydrogenaudio Forums > Hosted Forums > foobar2000 > Support - (fb2k)
widerock
As I remember, winamp doesn't have any "windows title bar".

I think that if I can remove "windows title bar" from foobar, I can put foobar in other program's "windows title bar" using 'always on top'.

Even though I know that there is a trick,(Drag 'windows title bar' of Foobar outside of screen.)
I want the fundamental solution.

Is it possible?
crono cloud
i wanted this too, but from what i was told its not currently possible by a plugin
Mangix
just a side note, it's not possible because of the fact that the SDK's license does not permit you from messing with the GUI. since technically the title bar is part of the GUI, it's not possible as crono cloud mentioned.
kjoonlee
Of course, you could create a new GUI instead of modifying the default UI at runtime.
mazy
well, it's possible using 3rd party utils.

desktop screenshot with foobar without titlebar (done setting foobar window's style using 'flash desktops 2' multiple-desktops manager). i'm using mouse gestures (through utility 'strokeit!') to move the window (sending keystrokes alt+space,m,up,down). i guess there could be better way how to do that (using window's messages or something). it would be nice to have modified version of trackinfo panel which could be dragged like titlebar to move the window.
IPB Image
jpg, 264kb, 1920x1200
BelleAndZEK
or you can use windowblinds and make a theme where it has no titlebar and use this theme only for foobar (config/per application)
david_dl
QUOTE(mazy @ Apr 26 2006, 03:35 PM) *

i guess there could be better way how to do that (using window's messages or something). it would be nice to have modified version of trackinfo panel which could be dragged like titlebar to move the window.


Right click on taskbar tab->Move->Use keyboard arrow keys.
mazy
i know about that, david_dl. but i want to use mouse to move the window (without going to that taskbar menu), so i'm sending keystrokes which lead to this action ... you have to press any arrow key and then can move the window by mouse. i thought there may be specific message i could send to the window to set in into this 'move-around' mode ...
crono cloud
this program flash desktops 2 is what ive been lookin for for a long time

but is there anyway to make it remember settings for each program

for example, remember that i had foobar2000's titlebar invisible when restarting foobar2000
muzgus
QUOTE(mazy @ Apr 26 2006, 04:35 AM) *


IPB Image
jpg, 264kb, 1920x1200


Just curious, how do you make the foobar controls like you have on the left on the screenshot?
mazy
QUOTE(crono cloud @ Apr 28 2006, 05:46 AM) *

this program flash desktops 2 is what ive been lookin for for a long time

but is there anyway to make it remember settings for each program

for example, remember that i had foobar2000's titlebar invisible when restarting foobar2000

yes, sure ... on the last tab 'rules', you can create rule that gets executed when foobar starts and sets its style accordingly.

QUOTE(muzgus @ Apr 28 2006, 10:12 AM) *

Just curious, how do you make the foobar controls like you have on the left on the screenshot?

that's media control plugin for TrueLaunchBar, which is enhanced toolbar utility ...
mazy
i have found better solution to this and my other needs ...

it's called AutoHotKey. you can set it up to do all kinds of things, like alt+drag to move window around, disable some win-key shortcuts (like win+u, win+e, win+f ...) or map them to different actions.

my show / hide action for foobar (for 0.9.x version) is like this (together with some other easy hotkeys shown as example):

CODE
Process, Priority,, High; Raise this script to high priority.

; ------------------------------------------------------------------------------
; disabled window-key shortcuts

#u::return
#^f::return
#e::return
#f1::return

; ------------------------------------------------------------------------------
; foobar2000 show / hide + style change

#f::
#h::
foobar_exe = C:\SEC\Audio\foobar2000 0.9\foobar2000.exe
Process, Exist, foobar2000.exe
foobar_pid = %ErrorLevel%
if (foobar_pid = 0) {
    Run %foobar_exe%, , , foobar_pid
    WinWait, ahk_pid %foobar_pid%
    WinSet, Style, -0xC00000, ahk_pid %foobar_pid%
;    WinSet, Redraw, , ahk_pid %foobar_pid%
} else {
    IfWinExist, ahk_pid %foobar_pid%
    {
        Run %foobar_exe% /command:"activate or hide"
    } else {
        Run %foobar_exe% /command:"activate or hide"
        WinWait, ahk_pid %foobar_pid%
        WinActivate, ahk_pid %foobar_pid%
    }
;    Sleep, 200
} return

; ------------------------------------------------------------------------------
; default 'run' hotkeys

#s::        Run C:\Utils\System\Servant Salamander 2.5\SALAMAND.exe
#i::        Run C:\Program Files\Internet Explorer\IEXPLORE.EXE
#t::        Run C:\SYS\TV\WinFast\WFTVFM\WFTV.exe
#g::        Run C:\Program Files\Internet Explorer\IEXPLORE.EXE http://www.google.com
#^i::        Run C:\Program Files\Internet Explorer\IEXPLORE.EXE http://www.imdb.com
#w::        Run C:\Program Files\Internet Explorer\IEXPLORE.EXE http://en.wikipedia.org/wiki/Main_Page

#^!ScrollLock::    Run taskkill /F /IM oblivion.exe

all you have to do is download and install AutoHotKey (it's very easy on system resources - regarding gui/user objects etc.), change foobar_exe = line to point to your foobar's installation, save this code to file with ahk extension and run it.

win+f or win+h shortcut would start foobar (if not running) and make it title-less, it would toggle the window (show / hide) otherwise.

edit: improved the foobar's script. you can uncomment the line with "Sleep, 200" to put minimal 200ms delay between show / hide
Stuart60611
Could you explain how I press win+f or win+h. What is the win key?

moderation: Removed unnecessary full quote of previous post.
mazy
it's the key with windows logo on it, which is available on win-enabled keyboards. it's located between ctrl and alt.

you could change the shortcut to anything else (there's help included in AutoHotKey installation). codes for modifier keys are as follows:

CODE
#    Win (Windows logo key)
!    Alt
^    Control
+    Shift

so, to change it to, for example, ctrl+alt+f, you have to change

CODE
#f::
#h::

to

CODE
^!f::

mazy
updated script which is no more using foobar's commands, but AutoHotKey's WinHide / WinShow functions instead:

CODE
#f::
#h::
foobar_exe = C:\SEC\Audio\foobar2000 0.9\foobar2000.exe
Process, Exist, foobar2000.exe
foobar_pid = %ErrorLevel%
if (foobar_pid = 0) {
    Run %foobar_exe%, , , foobar_pid
    WinWait, ahk_pid %foobar_pid%
    WinSet, Style, -0xC00000, ahk_pid %foobar_pid%
} else {
    IfWinExist, ahk_pid %foobar_pid%
    {
        WinHide
    } else {        
        SetTitleMatchMode, 2
        WinShow, foobar2000
        SetTitleMatchMode, 1
        WinActivate, ahk_pid %foobar_pid%
    }
;    Sleep, 200
} return
mazy
another update, now it toggles between active / hidden window.

CODE
; -------------------------------------
; foobar2000 show / hide + style change

#f::
#h::
foobar_exe = C:\SEC\Audio\foobar2000 0.9\foobar2000.exe
Process, Exist, foobar2000.exe
foobar_pid = %ErrorLevel%
if (foobar_pid = 0) {
    Run %foobar_exe%, , , foobar_pid
    WinWait, ahk_pid %foobar_pid%
    WinSet, Style, -0xC00000, ahk_pid %foobar_pid%
    WinActivate, ahk_pid %foobar_pid%
} else {
    IfWinActive, ahk_pid %foobar_pid%
    {
        WinHide
    } else {
        WinShow, ahk_class {E7076D1C-A7BF-4f39-B771-BCBE88F2A2A8}
        WinShow, ahk_class {DA7CD0DE-1602-45e6-89A1-C2CA151E008E}/1        
        WinActivate, ahk_pid %foobar_pid%
    }
;    Sleep, 200
} return
pepoluan
Does foobar's ahk_class change in every version evolution? Because I currently instead of using Process, Exist I used Window Spy and jot down the hard-coded value of foobar2000's ahk_class.

So in my script, the lines:
CODE
foobar_exe = C:\SEC\Audio\foobar2000 0.9\foobar2000.exe
Process, Exist, foobar2000.exe
foobar_pid = %ErrorLevel%
if (foobar_pid = 0) {
can be replaced with IfWinNotExist instead.
mazy
QUOTE(pepoluan @ Jun 19 2006, 14:00) *
Does foobar's ahk_class change in every version evolution? Because I currently instead of using Process, Exist I used Window Spy and jot down the hard-coded value of foobar2000's ahk_class.

hello! well there are two most used guis (default and column_ui), so yes ... other than that, i was reluctant to go the window class way, as that could easily change and iirc the devs discouraged using them (if acquired by other means than by the sdk).

so i tried to go by process id first, only to find that i would need window classes in later iterations of the script. btw, is there any way to specify logical operators in the ifwin* or win* commands? like IfWinExists (ahk_class ABC) or (ahk_class DEF)? i guess i could use the function version of these commands and combine it in regular If ... not sure though.
pepoluan
IfWin can't have operators, so you can't use IfWinExists () or ().

However you can test for negative negative. I.e.

NeitherExists:=false
IfWinNotExist
{
IfWinNotExit
{
NeitherExists:=true
}
}

If (Not NeitherExists) {
;something
}
mazy
thanks, you're right ... though it's a little bit cumersome. well, i guess that will do smile.gif
Neural_Overload
QUOTE(mazy @ Apr 25 2006, 19:35) *

IPB Image
jpg, 264kb, 1920x1200


Can you list all the toolbars and things on your desktop, i really like that setup and would like to know how you did it.

Thanks biggrin.gif
mazy
these toolbars are TrueLaunchBar. other than that, you can see rainlendar in the bottom-right corner. that small box below it is cFosSpeed, network optimizer / prioritizer ...
mellow
is there a way to make the script launch at the same time as foobar?

ie one shortcut launching two programs?
pepoluan
QUOTE(mellow @ Sep 1 2006, 18:52) *
is there a way to make the script launch at the same time as foobar?

ie one shortcut launching two programs?
I usually just load AutoHotkey at startup and chain the AutoHotkey.ini file to whatever script I want at startup, so it runs all the time.

But if you don't need AutoHotkey to be on all the time, prefix the script with a Run command that starts foobar. Next time, don't start foobar's exe, just start the script and foobar will be loaded soon afterwards.

This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2008 Invision Power Services, Inc.