Options to remove Windows Close & Maximise buttons.

Please check the FAQ (https://www.xyplorer.com/faq.php) before posting a question...
binocular222
Posts: 1424
Joined: 04 Nov 2008 05:35
Location: Win11, Win10, 100% Scaling

Re: Options to remove Windows Close & Maximise buttons.

Post by binocular222 »

Very simple AHK script:

Code: Select all

#Ifwinactive, ahk_class Notepad
^o::
XYplorerID := WinExist("ahk_class ThunderRT6FormDC")
NotepadID := WinExist("ahk_class Notepad")
DllCall("SetParent", "uint", XYplorerID, "uint", NotepadID)
Ctrl+O in Notepad will make XY window become child to Notepad
I'm a casual coder using AHK language. All of my xys scripts:
http://www.xyplorer.com/xyfc/viewtopic. ... 243#p82488

admin
Site Admin
Posts: 67258
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: Options to remove Windows Close & Maximise buttons.

Post by admin »

AHK is really cool, wow.

But I'm not ready to give up my trademark titlebar for it, sorry. :)

mkolaski
Posts: 33
Joined: 16 Jul 2013 20:16
Location: UK

Re: Options to remove Windows Close & Maximise buttons.

Post by mkolaski »

One other feature that I'd like to ask about (which fits into my overall goal of using XYplorer to replace an in-application browser) is; can XYplorer also have a toggle added so that it always remains on top of all other applications (similar to Windows Task Manager)? That way when the below application (with the crap in house file browser) is being manipulated/used, XYplorer will remain on top in it's own corner, ready for interaction at any given time.
@Burningfeetman: I use AHK to do this - can't remember where I got the script but I use the following (invoked with Win + T):

Code: Select all

#t::
ActiveHwnd := WinExist("A")
WinGetTitle, WindowTitle, ahk_id %ActiveHwnd%
WinGet, ExStyle, ExStyle, ahk_id %ActiveHwnd%
if (ExStyle & 0x8)
    OnTop=1
else
    OnTop=0
Winset, AlwaysOnTop, Toggle, ahk_id %ActiveHwnd%

StringReplace, WindowTitle, WindowTitle, %A_Space%- (Pinned)
if not OnTop
  WindowTitle:=WindowTitle . " - (Pinned)"

WinSetTitle, ahk_id %ActiveHwnd%,,%WindowTitle%
return
As you don't like title bars, you could just do this :biggrin:

Code: Select all

#t:: Winset, Alwaysontop, , A
HTH

Cheers,
Michael

klownboy
Posts: 4481
Joined: 28 Feb 2012 19:27
Location: Windows 11, 25H2 Build 26200.8737 at 100% 2560x1440

Re: Options to remove Windows Close & Maximise buttons.

Post by klownboy »

Hi Don, I can see why
admin wrote:I'm not ready to give up my trademark titlebar for it, sorry
but, it would be nice to be able to go completely minimalistic temporarily via scripts especially for viewing thumbnails in various photo folders.
thumbs_cap.png
We can remove all the other bars via scripting but the not titlebar. It would be great if we could remove the titlebar temporarily even if it was only through scripting. Obviously, we wouldn't use it for normal operations in XYplorer. Those thumbs are from my camera, not internet wallpaper this time. :)
Thanks,
Ken
To see the attached files, you need to log into the forum.

binocular222
Posts: 1424
Joined: 04 Nov 2008 05:35
Location: Win11, Win10, 100% Scaling

Re: Options to remove Windows Close & Maximise buttons.

Post by binocular222 »

How many more vote do we need to change Don's mind?
I'm a casual coder using AHK language. All of my xys scripts:
http://www.xyplorer.com/xyfc/viewtopic. ... 243#p82488

admin
Site Admin
Posts: 67258
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: Options to remove Windows Close & Maximise buttons.

Post by admin »

Wow, beautiful foggy shots.
binocular222 wrote:How many more vote do we need to change Don's mind?
12,000?

klownboy
Posts: 4481
Joined: 28 Feb 2012 19:27
Location: Windows 11, 25H2 Build 26200.8737 at 100% 2560x1440

Re: Options to remove Windows Close & Maximise buttons.

Post by klownboy »

Thanks for comment on the camera shots (Fujifilm X100S), bummer on the titlebar 12,000 comment. :(

binocular222
Posts: 1424
Joined: 04 Nov 2008 05:35
Location: Win11, Win10, 100% Scaling

Re: Options to remove Windows Close & Maximise buttons.

Post by binocular222 »

while($Index < 12000) {msg Please remove title bar!; incr $Index}
I'm a casual coder using AHK language. All of my xys scripts:
http://www.xyplorer.com/xyfc/viewtopic. ... 243#p82488

dimon157
Posts: 1
Joined: 10 Feb 2020 10:22

Re: Options to remove Windows Close & Maximise buttons.

Post by dimon157 »

Seems I have found solution! Just using -0x80000 value instead of -0xC30000 both leaves title and hides all other gui elements, semi-solving what topic starter asked and solving what i wanted.

Leaving title bar besides eating space has its own advantages, as lets to move window (without border that is a problem) and visually serves as a "dock" for information inside XYplorer.
highend wrote: ↑21 Jan 2014 23:31 Why not just use a SetTimer command in Autohotkey?

Code: Select all

#NoTrayIcon
#SingleInstance force
#Persistent

SetTimer, RemoveWindowElements, 100
return

RemoveWindowElements:
;WS_MAXIMIZEBOX 0x10000 + WS_MINIMIZEBOX 0x20000 + WS_CAPTION 0xC00000 = 0xC30000
WinSet, Style, -0xC30000, ahk_class ThunderRT6FormDC
return
100 msecs should be enough (this app won't consume any noticable amount of cpu power with it)...

Post Reply