Vista Style Builder

   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: How can I remove the Caption Icon?  (Read 13437 times)
gtjgtj
Beginner
*
Posts: 71


View Profile WWW
« on: October 17, 2011, 08:33:56 am »

Hello, this is my second question  Wink

Is there a solution to remove the caption icon?



Logged
chiwou
Beginner
*
Posts: 44


View Profile
« Reply #1 on: October 17, 2011, 01:18:01 pm »

there is an autohotkey script somewhere
Logged
gtjgtj
Beginner
*
Posts: 71


View Profile WWW
« Reply #2 on: October 17, 2011, 02:11:21 pm »

Quote
Insert Quote
there is an autohotkey script somewhere

Nice answer   Wink  Where can I find it....??  Whoa
Logged
chiwou
Beginner
*
Posts: 44


View Profile
« Reply #3 on: October 17, 2011, 07:23:21 pm »

Code:
#NoTrayIcon
#Persistent
#NoEnv
#SingleInstance, Force
SetWorkingDir, %A_ScriptDir%
DetectHiddenWindows, Off
OnExit, Cleanup
SysGet, TBarHeight, 4

Menu, Tray, NoStandard
Menu, Tray, Add, Exit, Cleanup

Gui +LastFound
hWnd := WinExist()

; Hook the shell.
; http://www.autohotkey.com/forum/viewtopic.php?p=123323#123323
DllCall( "RegisterShellHookWindow", UInt, hWnd )
MsgNum := DllCall( "RegisterWindowMessage", Str, "SHELLHOOK" )
OnMessage( MsgNum, "ShellMessage" )

; Create a blank cursor for use instead of a blank icon file.
; http://www.autohotkey.com/forum/viewtopic.php?p=220113#220113
VarSetCapacity( AndMask, 32*4, 0xFF ), VarSetCapacity( XorMask, 32*4, 0 )
hIcon := DllCall( "CreateCursor", Uint, 0, Int, 0, Int, 0, Int, 32, Int, 32, Uint, &AndMask, Uint, &XorMask )

; Initial loop to blank out existing windows.
WinGet, s, List
Loop, % s
{
    s := s%A_Index%
    ;SendMessage, 0x80, 0, hIcon, , % "ahk_id " . s
}

; MsgBox, 36, TBarIconBlanker, Would you like to enable the min/max/close buttons tweak as well?
; IfMsgBox, Yes
; {
;     MinMaxCloseOption := 1
;     SetTimer, WatchCursor, 100
; }
;MinMaxCloseOption := 1
;SetTimer, WatchCursor, 100

Return ; End of auto-execute section.


; ------------------------------------------------------------------------
; Subroutines ------------------------------------------------------------
; ------------------------------------------------------------------------

Cleanup:
{
    If ( MinMaxCloseOption = 1 ) ; Restore titlebar buttons on close.
    {
        WinGet, s, List
        Loop, % s
        {
            s := s%A_Index%
            WinSet, Style, +0x80000, % "ahk_id " . s ; Restore min/max/close buttons.
        }
    }
    ExitApp
}
Return


WatchCursor:
{
    MouseGetPos, , yPos, CurrID,
    If ( yPos >= 0 and yPos < ( TBarHeight + 3 ) )
    {
        WinSet, Style, +0x80000, % "ahk_id " . CurrID ; Restore min/max/close buttons.
        SendMessage, 0x80, 0, hIcon, , % "ahk_id " . CurrID ; Blank out titlebar and taskbar icons.
    }
    Else
    {
        WinSet, Style, -0x80000, % "ahk_id " . PrevID ; Get rid of min/max/close buttons.
        WinSet, Style, -0x80000, % "ahk_id " . CurrID ; Get rid of min/max/close buttons.
        SendMessage, 0x80, 0, hIcon, , % "ahk_id " . CurrID ; Blank out titlebar and taskbar icons.
    }
}
Return


; ------------------------------------------------------------------------
; Functions --------------------------------------------------------------
; ------------------------------------------------------------------------

; Shell hook to blank out windows that are subsequently created.
ShellMessage( wParam, lParam )
{
    Global hIcon, MinMaxCloseOption, PrevID
    If wParam in 1,6,32772
    {
        SendMessage, 0x80, 0, hIcon, , % "ahk_id " . lParam ; Blank out titlebar and taskbar icons.
        If ( MinMaxCloseOption = 1 )
        {
            WinSet, Style, -0x80000, % "ahk_id " . lParam ; Get rid of min/max/close buttons.
        }
    }
    PrevID := lParam
}
Logged
3am
Beta Tester
Dedicated Helper
*
Posts: 2428



View Profile
« Reply #4 on: October 17, 2011, 10:03:59 pm »

If you don't know how to use Autohotkey, here's a good tutorial:

http://www.howtogeek.com/56481/the-beginners-guide-to-using-an-autohotkey-script/
Logged
gtjgtj
Beginner
*
Posts: 71


View Profile WWW
« Reply #5 on: October 18, 2011, 06:48:06 pm »

Wow,

til now I never heard about autohotkey  Embarrassed

I am going to check it out.

@chiwou: Thank you for the script. I will see how it works - when I try autohotkey

Thank you all for your help
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.12 | SMF © 2006-2009, Simple Machines LLC Valid XHTML 1.0! Valid CSS!