在activeX控件中 添加一个属性 有个向导 这个我知道我已经创建好了 关键是 这个属性 需要在模块文件中使用 而且暂时不能通过 函数 参数的方法调用。 请问 在模块文件中的某个函数里 怎么调用已经初始化过的属性值下面是向导生成的属性定义等。Const m_def_WindowTitleName = "事务提醒" 'Property Variables: Dim m_WindowTitleName As StringPublic Property Get WindowTitleName() As String WindowTitleName = m_WindowTitleName End PropertyPublic Property Let WindowTitleName(ByVal New_WindowTitleName As String) m_WindowTitleName = New_WindowTitleName PropertyChanged "WindowTitleName" End Property'Initialize Properties for User Control Private Sub UserControl_InitProperties() m_WindowTitleName = m_def_WindowTitleName End Sub'Load property values from storage Private Sub UserControl_ReadProperties(PropBag As PropertyBag) m_WindowTitleName = PropBag.ReadProperty("WindowTitleName", m_def_WindowTitleName) End Sub'Write property values to storage Private Sub UserControl_WriteProperties(PropBag As PropertyBag) Call PropBag.WriteProperty("WindowTitleName", m_WindowTitleName, m_def_WindowTitleName) End Sub
这个我知道我已经创建好了
关键是 这个属性 需要在模块文件中使用
而且暂时不能通过 函数 参数的方法调用。
请问 在模块文件中的某个函数里 怎么调用已经初始化过的属性值下面是向导生成的属性定义等。Const m_def_WindowTitleName = "事务提醒"
'Property Variables:
Dim m_WindowTitleName As StringPublic Property Get WindowTitleName() As String
WindowTitleName = m_WindowTitleName
End PropertyPublic Property Let WindowTitleName(ByVal New_WindowTitleName As String)
m_WindowTitleName = New_WindowTitleName
PropertyChanged "WindowTitleName"
End Property'Initialize Properties for User Control
Private Sub UserControl_InitProperties()
m_WindowTitleName = m_def_WindowTitleName
End Sub'Load property values from storage
Private Sub UserControl_ReadProperties(PropBag As PropertyBag) m_WindowTitleName = PropBag.ReadProperty("WindowTitleName", m_def_WindowTitleName)
End Sub'Write property values to storage
Private Sub UserControl_WriteProperties(PropBag As PropertyBag) Call PropBag.WriteProperty("WindowTitleName", m_WindowTitleName, m_def_WindowTitleName)
End Sub
在调用EnumWindows前设置全局变量