例如:
在Dll中:
Dim m_TextBox as TextBox
.
.
Public Property Let TextBox(ByVal New_TextBox As Variant)
'///////////////////////////////////
'/ 属性:TextBox控件
Set m_TextBox = New_TextBox
End Property
.
.在Form中引用Dll:
Dim test as new EnganceTextBox 'EnganceTextBox是我写的dll
test.TextBox = TextBox1 'TextBox1作为dll的属性设置为当前Form1的TextBox1
.
.目前无法正确设置TextBox属性,提示:“private object modules cannot be used in public object modules as parameters or return types for public procedures,as public data members, or as fields of public user defined types”是不是控件无法作为Dll的属性接口?可以的话要如何设置?程序怎么写?
是不是这种情况只能将dll改成ocx?
在Dll中:
Dim m_TextBox as TextBox
.
.
Public Property Let TextBox(ByVal New_TextBox As Variant)
'///////////////////////////////////
'/ 属性:TextBox控件
Set m_TextBox = New_TextBox
End Property
.
.在Form中引用Dll:
Dim test as new EnganceTextBox 'EnganceTextBox是我写的dll
test.TextBox = TextBox1 'TextBox1作为dll的属性设置为当前Form1的TextBox1
.
.目前无法正确设置TextBox属性,提示:“private object modules cannot be used in public object modules as parameters or return types for public procedures,as public data members, or as fields of public user defined types”是不是控件无法作为Dll的属性接口?可以的话要如何设置?程序怎么写?
是不是这种情况只能将dll改成ocx?
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货