To make the clock time clickable and open the Taskbar on secondary monitors in Windows, follow these steps:
- Right-click on an empty space on the Taskbar.
- Select
Taskbar settings. - Scroll down to the
Taskbar behaviorssection. - Enable the option
Automatically hide the taskbar in desktop mode. - Scroll down to the
Multitaskingsection. - Enable the option
Show taskbar on all displays. - Enable the option
Use Start menu instead of the app list. - Scroll down to the
Notification areasection. - Enable the option
Show hidden icons by default.
Now, let's add a custom script to make the clock time clickable:
- Right-click on the Taskbar again and select
Taskbar settings. - Scroll down to the
Taskbar appssection. - Click on
New task. - Name the task
Clock Clickable. - In the
Commandfield, paste the following PowerShell script:
Add-Type -AssemblyName System.Windows.Forms
[System.Windows.Forms.SystemInformation]::DoubleClickDelay = 0
function ShowTaskbar() {
$taskbar = [System.Windows.Forms.SystemInformation]::GetTaskbar()
$taskbar.Visible = $true
}
$form = New-Object System.Windows.Forms.Form
$form.StartPosition = "Manual"
$form.FormBorderStyle = "None"
$form.TopMost = $true
$form.Size = New-Object System.Drawing.Size(1,1)
$form.Add_MouseDown({ ShowTaskbar })
$form.Show()
# Keep the form alive until the user clicks somewhere else
Register-ObjectEvent -InputObject $form -EventName MouseUp -Action { $form.Dispose() }
- Click on
OK.
Now, whenever you click on the clock time, the Taskbar will appear on all secondary monitors.
References: