我做了个.OCX控件,这个控件包含UserControl和一个窗体Form1,现在我要在Form1中用到UserControl中定义的属性,例如:
在UserControl代码中: Public Static Property Get ImageStatePump() As String
ImageStatePump = strImageStatePump
End PropertyPublic Static Property Let ImageStatePump(ByVal vNewValue As String)
strImageStatePump = vNewValue
PropertyChanged "ImageStatePump"
End Property
现在我需要在Form1中得到ImageStatePump的值,
请问如何做法?谢谢.
在UserControl代码中: Public Static Property Get ImageStatePump() As String
ImageStatePump = strImageStatePump
End PropertyPublic Static Property Let ImageStatePump(ByVal vNewValue As String)
strImageStatePump = vNewValue
PropertyChanged "ImageStatePump"
End Property
现在我需要在Form1中得到ImageStatePump的值,
请问如何做法?谢谢.
则这样调用a.ImageStatePump
2.直接读 实例名.strImageStatePump
................
End Sub