取类名,应该算难的问题了吧
dim t as new class1msgbox test(t)
Public Sub test(obj As Object) as string
test=在这里如何可以获得obj的真实类名(class1)
end sub --------------------编程问答-------------------- Public Sub test(obj As Object) as string
test=typename(obj)
end sub --------------------编程问答-------------------- typename或者使用typeof --------------------编程问答--------------------
晕
Public Function test(obj As Object) as string
test=typename(obj)
end sub --------------------编程问答-------------------- Public Function GetName(obj As Object) As String
GetName = TypeName(obj)
End Function --------------------编程问答-------------------- 多谢多谢,如果在类不同的工程里呢? --------------------编程问答-------------------- ..路过 --------------------编程问答-------------------- 我还以为说的是获得窗口类的类名呢~~~~~ --------------------编程问答-------------------- typename就可以解决的
补充:VB , 基础类