Is it possible to disable the right-click context menu on the TitleBar, WITHOUT removing the title bar and/or the icon? If yes, how?
I am using PowerShell.
I found these two posts, but they are in C# specifically. I don't have enough experience with C# to implement it properly with PowerShell:
Prevent showing system context menu on right click on Form title bar
How to handle Form caption right click
I have the basic code for detecting the mouse event, but I'm not sure how to implement it to detect the right mouse click on the TitleBar only.
$window.Add_MouseDown(
{
if (($_.Button.ToString() -eq "Right")) {
# Code here
}
}
)
Any help with PowerShell code would be appreciated.