简体   繁体   English

VB.NET如何检查PictureBox是否包含图像?

[英]VB.NET How can I check if a PictureBox contains an image?

I'm using VB.NET forms app and I need to check if a PictureBox currently has an image in it. 我正在使用VB.NET表单应用程序,我需要检查PictureBox当前是否有图像。 How would I do this? 我该怎么做?

Thanks 谢谢

If Not pictureBox.Image is Nothing Then
    //do stuff here
Else
    //do other stuff
End If

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM