你的意思是把a的返回值赋值给b
Function a(range1 as range) as string
a="100"
end function
b = a(参数)
目前来说定义类型最好用class不要用type。定义stands最好写成这样
Public Class stands
Public a As Integer
Public b As Integer
Public c As Integer
Public d(2) As Integer
Public Sub read(ByVal x As Integer, ByVal y As Integer, ByVal z As Integer)
a = x + y
b = x + z
c = y + z
d(0) = x + y + z
d(1) = x + y + z + 1
d(2) = x + y + z + 2
End Sub
End Class
在form1里这样用
dim v as new stands
vread(1,2,3)
然后比如需要知道a就x=va就可以了
还有就是不知道你用的什么版本的VB,我用的VB2008已经规定数组下限只能是0了。不能象d(1 To 3) As Integer 这样定义数组了。
我具体是这么做的:先新建一个activexdll工程,我是做实验的,里面只有一个函数public
function
go()
as
string
go
=
"sdf"end
function在delphi中如何调用?
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)