ListView控件在程序开发过程中的使用是非常广泛的。因为其不支持数据库的绑定,所以在数据库程序开发领域无法与datagridview抗衡,但是ListView的确是一个非常好用的控件。下面就把一个简单的ListView的例子发出来。
Public Class Form6Class Form6
'''
''' 英雄类
'''
'''
Public Class heroClass hero
Private s_name As String
Private s_age As Long
Private s_like As String
Public Property myName()Property myName() As String
Get
Return s_name
End Get
Set(ByVal value As String)
s_name = value
End Set
End Property
Public Property myAge()Property myAge() As Long
Get
Return s_age
End Get
Set(ByVal value As Long)
s_age = value
End Set
End Property
Public Property myLike()Property myLike() As String
Get
Return s_like
End Get
Set(ByVal value As String)
s_like = value
End Set
End Property
End Class
'''
''' 公共属性
'''
'''
Dim arrLike() As String = {"杀人", "放火", "吸毒", "抢劫", "盗窃", "上吊", "自虐", "赌博", "偷窥", "飙车"}
Dim heroList As New SortedList
Dim maxNumber As Long
Const firstName As String = "塞北的雪"
Dim s_flag As Boolean
'''
''' 生成随即爱好
'''
'''
'''
'''
Private Function createLike()Function createLike(ByVal i As Long) As String
Dim j As Long
Dim k As Long
Dim str As New System.Text.String |