Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/powershell/12.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/wcf/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Events Windows窗体-Powershell-PictureBox/TextBox上的鼠标悬停事件_Events_Powershell_Picturebox_Mousehover - Fatal编程技术网

Events Windows窗体-Powershell-PictureBox/TextBox上的鼠标悬停事件

Events Windows窗体-Powershell-PictureBox/TextBox上的鼠标悬停事件,events,powershell,picturebox,mousehover,Events,Powershell,Picturebox,Mousehover,我用windows窗体制作了一个GUI。只是想知道是否可以为图片框(新对象System.Windows.Forms.PictureBox)添加鼠标悬停事件 我做的一个快速解决方法是在图片框所在的位置创建不可见按钮,并在该按钮上添加.add_mousehover和.add_mouseleave事件。真的很乱 有什么想法吗?您可以将添加鼠标盖添加到System.Windows.Forms.PictureBox对象中 $test = {MSG * 1} $pictureBox1 = New-Objec

我用windows窗体制作了一个GUI。只是想知道是否可以为图片框(新对象System.Windows.Forms.PictureBox)添加鼠标悬停事件

我做的一个快速解决方法是在图片框所在的位置创建不可见按钮,并在该按钮上添加.add_mousehover和.add_mouseleave事件。真的很乱


有什么想法吗?

您可以将添加鼠标盖添加到System.Windows.Forms.PictureBox对象中

$test = {MSG * 1}
$pictureBox1 = New-Object System.Windows.Forms.PictureBox
$pictureBox1.add_mousehover($test)

谢谢你,巴德!事实上,在早些时候尝试过,发现它并没有按预期工作。原来我在另一个图片框中指定了事件,并突出显示了另一个。哈哈。