cplusplus

VBS中类的用法

上一篇 / 下一篇  2011-07-01 17:26:07 / 个人分类:QTP

Class class1
    Public Function add(a,b)
        msg()
        add=a+b
    End Function
    
    Private Sub msg
        MsgBox "按确定开始计算"
    End Sub
    Public Function SetPath(paths)
        path = paths
    End Function
    Public Function GetPath()
        GetPath = path
    End function
    Public path
    Private proper
End Class

Set x=New class1
x.SetPath("haha")
MsgBox x.GetPath()
MsgBox x.add(1,2) 

TAG: VBS编程

 

评分:0

我来说两句

Open Toolbar