【求助】谁能详细说一下vb.net类的写法
vb.net吧
全部回复
仅看楼主
level 3
自学vb.net两年了,一直都不知道类到底怎么写,请各位高手详细指点一下
2013年04月21日 09点04分 1
level 3
自己顶一下
2013年04月21日 09点04分 2
level 3
顶顶顶
2013年04月21日 09点04分 3
level 8
最简单的,随便写点Public Shared函数编译成dll就可以了
2013年04月22日 19点04分 4
level 11
类?你说的是class?
2013年04月23日 00点04分 5
对的
2013年04月26日 12点04分
level 13
你用了2年模块?
2013年04月23日 01点04分 6
是从没用过模块
2013年04月26日 12点04分
回复 zhangxiaomengg :那你的代码填写到哪里了?
2013年04月26日 12点04分
以前是都写在主程序里,现在感觉那样不专业,所以想知道。可是看了许多文章看不懂
2013年04月26日 12点04分
@璐村惂鐢ㄦ埛_0QENC58馃惥 你没看见窗体代码在一个类里面?
2013年04月26日 13点04分
level 3
对啊,写成类或dll好更新
2013年04月26日 12点04分 7
level 10
Public Class GridOption
Inherits DataGridView
Private M_Grid As DataGridView
Public Sub GridColWidth(ByVal ColWidth As String)
SetGridWidth(ColWidth, M_Grid) '设置每列宽度
End Sub
Public Sub GridCol(ByVal ColStr As String)
SetGridCol(ColStr, M_Grid) '设置每列名称
End Sub
Public Property Cell(ByVal Row As Int16, ByVal Col As Int16) As Object
Get
Return M_Grid.Rows.Item(Row).Cells(Col).Value
End Get
Set(ByVal value)
M_Grid.Rows.Item(Row).Cells(Col).Value = value
End Set
End Property
Sub New(ByVal Grid As DataGridView)
M_Grid = Grid
SetGrid(Grid) '初始化grid
End Sub
End Class
我写的一个类 继承DataGridView,目的是对grid进行设置初始化和简化读写语句
2013年04月27日 01点04分 8
1