VE.net的如何判断Picturebox.image为空?
如题! --------------------编程问答-------------------- If Me.PictureBox1.Image Is Nothing ThenMsgBox("没有图像")
End If --------------------编程问答-------------------- VE.net是什么东东?! --------------------编程问答-------------------- Public Class Form1
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim aa As New NewPictureBox
MsgBox(aa.IsEmpty)
End Sub
End Class
Public Class NewPictureBox
Inherits PictureBox
Public Function IsEmpty() As Boolean
If Me.Image Is Nothing Then
Return True
Else
Return False
End If
End Function
End Class --------------------编程问答-------------------- xiexie
--------------------编程问答-------------------- If Me.PictureBox1.Image Is Nothing Then
MsgBox("没有图像")
End If
snowfox007() 正确 --------------------编程问答-------------------- Is Nothing判断就行了
--------------------编程问答-------------------- UP --------------------编程问答--------------------
Public Function IsEmpty(TheImage as Image) As Boolean
Return (TheImage Is Nothing)
End Function --------------------编程问答-------------------- reply
补充:.NET技术 , VB.NET