Visual Basic:如何检查三个PictureBox是否有相同的图像?

时间:2016-05-21 10:26:31

标签: vb.net

我知道如何检查两个PictureBox是否有相同的图像并且它可以工作:

If PictureBox1.Image Is PictureBox2.Image Then   
**What I want it to do**
End If

我尝试用三个PictureBox但不能正常工作:

If (PictureBox1.Image Is PictureBox2.Image) And (PictureBox1.Image Is PictureBox3.Image) Then
MessageBox.Show("TEST")
End If

如果有人能帮助我,我将不胜感激。感谢。

1 个答案:

答案 0 :(得分:-1)

您无法在VB.net中做到这一点,您需要执行以下操作:

If picturebox1.Image Is picturebox2.Image And picturebox1.Image Is picturebox3.Image Then
  '**What you want to do**
End if