Overlay Screen on All Monitors with Gui

Get help with using AutoHotkey (v2 or newer) and its commands and hotkeys
hasantr
Posts: 933
Joined: 05 Apr 2016, 14:18
Location: İstanbul

Overlay Screen on All Monitors with Gui

06 Aug 2023, 15:47

I wanted to make a screen saver app. I'm fine with it being slightly safe. I just have one question mark. Yes, I can put one gui at the front and cover the whole screen, but do we have a mechanism to do this automatically on the second or third monitors?
Thanks.
ntepa
Posts: 432
Joined: 19 Oct 2022, 20:52

Re: Overlay Screen on All Monitors with Gui

06 Aug 2023, 16:02

This shows a gui overlay across all monitors. Press Esc to close it:

Code: Select all

#Requires AutoHotkey v2.0

; Get x, y, width, height of the bounding rectangle of all display monitors.
vLeft := SysGet(76)
vTop := SysGet(77)
vWidth := SysGet(78)
vHeight := SysGet(79)

g := Gui("+AlwaysOnTop -Caption -DPIScale +ToolWindow")
g.BackColor := "Black"
g.SetFont("s22 cWhite")
g.Add("Text",, "Press Esc to close")
g.OnEvent("Escape", g => g.Destroy())
g.Show("x" vLeft " y" vTop " w" vWidth " h" vHeight)
hasantr
Posts: 933
Joined: 05 Apr 2016, 14:18
Location: İstanbul

Re: Overlay Screen on All Monitors with Gui

07 Aug 2023, 02:10

ntepa wrote:
06 Aug 2023, 16:02
This shows a gui overlay across all monitors. Press Esc to close it:

Code: Select all

#Requires AutoHotkey v2.0

; Get x, y, width, height of the bounding rectangle of all display monitors.
vLeft := SysGet(76)
vTop := SysGet(77)
vWidth := SysGet(78)
vHeight := SysGet(79)

g := Gui("+AlwaysOnTop -Caption -DPIScale +ToolWindow")
g.BackColor := "Black"
g.SetFont("s22 cWhite")
g.Add("Text",, "Press Esc to close")
g.OnEvent("Escape", g => g.Destroy())
g.Show("x" vLeft " y" vTop " w" vWidth " h" vHeight)
Thank you. When the cable I ordered to connect my old monitor to the Notebook arrives, I will test it immediately. I applied a screen saver with AHK v1, but I just realized that it can be overcome with multiple monitors. I hope to share it here when all the work is done. Thanks again.
User avatar
WarlordAkamu67
Posts: 224
Joined: 21 Mar 2023, 06:52

Re: Overlay Screen on All Monitors with Gui

07 Aug 2023, 05:35

hasantr wrote:
07 Aug 2023, 02:10
ntepa wrote:
06 Aug 2023, 16:02
This shows a gui overlay across all monitors. Press Esc to close it:

Code: Select all

#Requires AutoHotkey v2.0

; Get x, y, width, height of the bounding rectangle of all display monitors.
vLeft := SysGet(76)
vTop := SysGet(77)
vWidth := SysGet(78)
vHeight := SysGet(79)

g := Gui("+AlwaysOnTop -Caption -DPIScale +ToolWindow")
g.BackColor := "Black"
g.SetFont("s22 cWhite")
g.Add("Text",, "Press Esc to close")
g.OnEvent("Escape", g => g.Destroy())
g.Show("x" vLeft " y" vTop " w" vWidth " h" vHeight)
Thank you. When the cable I ordered to connect my old monitor to the Notebook arrives, I will test it immediately. I applied a screen saver with AHK v1, but I just realized that it can be overcome with multiple monitors. I hope to share it here when all the work is done. Thanks again.
Can't wait to see! Works for me ^.^

Return to “Ask for Help (v2)”

Who is online

Users browsing this forum: BlueHornet, Descolada, TAC109 and 21 guests