Code:
$form1_KeyDown=[System.Windows.Forms.KeyEventHandler]{
#Event Argument: $_ = [System.Windows.Forms.KeyEventArgs]
#TODO: Place custom script here
If ($_.KeyCode -eq [System.Windows.Forms.Keys]::Escape)
{
$form1.Close()
}
}
https://learn.microsoft.com/en-us/dotne ... esktop-8.0
Statistics: Posted by brittneyr — Wed Feb 28, 2024 8:30 am