How I can remove the Gui title bar icon in an about-gui like here?
[SOLVED] How to remove GUI title bar icon
[SOLVED] How to remove GUI title bar icon
Last edited by jNizM on 10 Feb 2014, 02:19, edited 2 times in total.
[AHK] v2.0.5 | [WIN] 11 Pro (Version 22H2) | [GitHub] Profile
-
- Posts: 8
- Joined: 06 Feb 2014, 16:50
Re: How to remove GUI title bar icon
Gui, -border
You can get a good look at a steak by looking up the cow's rear end but wouldn't you rather take the butchers word for it?
Re: How to remove GUI title bar icon
Gui -Caption would be more accurate. Try this out:
Just quickly slapped together, but you get the idea.
Code: Select all
Gui, Color, White
Gui, +ToolWindow -Caption +Border
Gui, Font, s15, Segoe UI
Gui, Add, Text,, About Gui
Gui, Show, w350 h200
Sleep, 2000
ExitApp
Re: How to remove GUI title bar icon
@fishgeek...
Ill hope you see the difference ^^
this is what i got so far
Ill hope you see the difference ^^
this is what i got so far
Code: Select all
Gui, 2: -0x20000 -0x10000
Last edited by jNizM on 07 Feb 2014, 09:31, edited 1 time in total.
[AHK] v2.0.5 | [WIN] 11 Pro (Version 22H2) | [GitHub] Profile
Re: How to remove GUI title bar icon
jNizM, this is going to seem totally counterintuitive,
because I'm essentially adding the ToolWindow ExStyle ( as the option ),
and then removing it again ( with the ExStyle code ).
IME there are a lot of fancy/semi complete approaches to this,
however none of them seem to remove the icon in the same manner as the example you posted.
because I'm essentially adding the ToolWindow ExStyle ( as the option ),
and then removing it again ( with the ExStyle code ).
Code: Select all
Gui, +hwndguihwnd +ToolWindow -MinimizeBox -MaximizeBox
Gui, Show, x-9999 w300 h300 ; remove/change the size but keep the xposition!
GuiSize: ; applies exstyle, places window at default position
WinWait % "ahk_id " guihwnd
WinSet, ExStyle, -0x00000080
WinMove, % (A_ScreenWidth-A_GuiWidth)/2
, % (A_ScreenHeight-A_GuiHeight)/2
Return
GuiClose:
ExitApp
IME there are a lot of fancy/semi complete approaches to this,
however none of them seem to remove the icon in the same manner as the example you posted.
Re: How to remove GUI title bar icon
Misunderstood. Sorry.
Re: How to remove GUI title bar icon
@fishgeek
np =)
@TLM
Too bad that there is nothing finished
but thx so far
btw stop use ghost mode and edit your post every minute
np =)
@TLM
Too bad that there is nothing finished
but thx so far
btw stop use ghost mode and edit your post every minute
[AHK] v2.0.5 | [WIN] 11 Pro (Version 22H2) | [GitHub] Profile
Re: How to remove GUI title bar icon
Your welcome but I'm not sure I understand what you mean by "nothing finished"jNizM wrote:@TLM
Too bad that there is nothing finished
but thx so far
btw stop use ghost mode and edit your post every minute
and I'm working on/testing some forum issues at the same time while I'm posted.
The version you see there now is final,
my apologize.
Re: How to remove GUI title bar icon
like -MinimizeBox (-0x20000) for Icon in Gui
Last edited by jNizM on 07 Feb 2014, 10:06, edited 2 times in total.
[AHK] v2.0.5 | [WIN] 11 Pro (Version 22H2) | [GitHub] Profile
Re: How to remove GUI title bar icon
Well, this is speculation
but it seems that it would probably be difficult to add seeing as there is no Extended Window Style for this:
http://msdn.microsoft.com/en-us/library ... 85%29.aspx
If you ask lexikos ( nicely ),
he will probably explain things in much better detail for you.
Who knows, he may even add it for you ; )
but it seems that it would probably be difficult to add seeing as there is no Extended Window Style for this:
http://msdn.microsoft.com/en-us/library ... 85%29.aspx
If you ask lexikos ( nicely ),
he will probably explain things in much better detail for you.
Who knows, he may even add it for you ; )
Re: How to remove GUI title bar icon
WS_SYSMENU (0x80000) - but its without close icon
[AHK] v2.0.5 | [WIN] 11 Pro (Version 22H2) | [GitHub] Profile
Re: How to remove GUI title bar icon
Did you even try my example above ?jNizM wrote:WS_SYSMENU (0x80000) - but its without close icon
http://img5.fotos-hochladen.net/uploads ... yaipde.png
It removes the icon, but keeps the close button.
Re: How to remove GUI title bar icon
Hi TLM,
nice trick!
That's all I need on Win 7:
nice trick!
That's all I need on Win 7:
Code: Select all
#NoEnv
; Main GUI
Gui, Main:+LabelMain
Gui, Main:Margin, 300, 200
Gui, Main:Add, Button, gShowChild, Show Child
Gui, Main:Show, , Main
Return
ShowChild:
; Child GUI w/o icon
Gui, Main: +Disabled
Gui, Child:New, +ToolWindow -MinimizeBox +LabelChild +OwnerMain
Gui, Child:Color, E0E0E0
Gui, Child:Show, w300 h300, Child w/o Icon
Gui, Child:-ToolWindow
Return
MainClose:
ExitApp
ChildClose:
Gui, Main:-Disabled
Gui, Destroy
Return
Re: How to remove GUI title bar icon
means a lot coming from youjust me wrote:Hi TLM,
nice trick!
ahh,jNizM wrote:How I can remove the Gui title bar icon in an about-gui...
I totally overlooked that this was for the child gui..
Well, now it can 'be applied' to parent gui's too so bonus
Re: [SOLVED] How to remove GUI title bar icon
Thanks for sharing this trick... I know this is an old topic but a small improvement that allows you to set the window as desired (ie: no icon, with close button) before the Gui, Show to both prevent the visual change to the window after its visible (sometimes with the above you can see the window flash from ToolWindow to -ToolWindow...) and also to fix the window dimension change from ToolWindow to regular window (ie everything shifts down about 5 pixels for me using the above, i assume the difference between the height of a normal caption and a toolwindow caption)
Anyway, this works better for me:
The only thing I can't get working is the same effect on Windows XP (though i'm sure its possible since Notepad or Explorer's about window is like this... and if you create a window using CreateWindowEx and not gui commands you can get "no icon with close button"
Edit: failure of above on XP, but background window is created with CreateWindowEx api and appears correct:
Anyway, this works better for me:
Code: Select all
; Gui, %GuiID%:Show, Hide ;if needed
Gui, %GuiID%:+Toolwindow
Gui, %GuiID%:+0x94C80000 ;Winset, Style, +0x94C80000
Gui, %GuiID%:-Toolwindow ;Winset, ExStyle, -0x00000080
; Gui, %GuiID%:+E0x00040000 ;WS_EX_APPWINDOW (Add to taskbar if needed)
Gui, %GuiID%:Show
Edit: failure of above on XP, but background window is created with CreateWindowEx api and appears correct:
EitherMouse - Multiple mice, individual settings . . . . www.EitherMouse.com . . . . forum . . . .
Re: [SOLVED] How to remove GUI title bar icon
I remember this trick working (either on Windows XP or Windows 7 or both), it was so good, but I'm testing it now on Windows 7 and it doesn't seem to be working!?
I tried running it in an old version of AHK, and renaming my Lib folders on the off chance that it was that, but still no luck.
I tried running it in an old version of AHK, and renaming my Lib folders on the off chance that it was that, but still no luck.
homepage | tutorials | wish list | fun threads | donate
WARNING: copy your posts/messages before hitting Submit as you may lose them due to CAPTCHA
WARNING: copy your posts/messages before hitting Submit as you may lose them due to CAPTCHA
Re: [SOLVED] How to remove GUI title bar icon
Another trick that I believe worked, also now seems not to work:
How to remove icon in GUI? - Ask for Help - AutoHotkey Community
https://autohotkey.com/board/topic/7384 ... on-in-gui/
[EDIT:]
It turns out both methods work, if aero mode is on, and both methods fail, if aero mode is off. I always have aero mode off, because even Notepad's Find dialog is noticeably slower to open, if aero mode is on.
Btw is there a reliable way to check if a title bar button is under the cursor when aero mode is on? Apparently WM_NCHITTEST is unreliable when aero mode is on.
How to remove icon in GUI? - Ask for Help - AutoHotkey Community
https://autohotkey.com/board/topic/7384 ... on-in-gui/
Code: Select all
Gui +LastFound
; WTNCA_NODRAWICON := 2
; WTNCA_NOSYSMENU := 4
DllCall("uxtheme\SetWindowThemeAttribute", "ptr", WinExist()
, "int", 1, "int64*", 6 | 6<<32, "uint", 8)
Gui Show, W200 H100, Window Title
It turns out both methods work, if aero mode is on, and both methods fail, if aero mode is off. I always have aero mode off, because even Notepad's Find dialog is noticeably slower to open, if aero mode is on.
Btw is there a reliable way to check if a title bar button is under the cursor when aero mode is on? Apparently WM_NCHITTEST is unreliable when aero mode is on.
homepage | tutorials | wish list | fun threads | donate
WARNING: copy your posts/messages before hitting Submit as you may lose them due to CAPTCHA
WARNING: copy your posts/messages before hitting Submit as you may lose them due to CAPTCHA
Who is online
Users browsing this forum: alawsareps, mikeyww, Rohwedder and 227 guests