下面是一个类中的代码:
为什么在关闭程序时
没有触发Class_WriteProperties事件
(已将类的persistable属性设为 1 )Option Explicit
Dim strT As String
Private myT As VariantPublic Property Get myTest() As String
myTest = strT
PropertyChanged "myTest"
End PropertyPublic Property Let myTest(newTest As String)
strT = newTest
PropertyChanged "myTest"
End Property
Private Sub Class_ReadProperties(PropBag As PropertyBag)
myTest = PropBag.ReadProperty("myTest", myT)
End Sub
Private Sub Class_WriteProperties(PropBag As PropertyBag)
PropBag.WriteProperty "myTest", myTest, myT
End Sub
为什么在关闭程序时
没有触发Class_WriteProperties事件
(已将类的persistable属性设为 1 )Option Explicit
Dim strT As String
Private myT As VariantPublic Property Get myTest() As String
myTest = strT
PropertyChanged "myTest"
End PropertyPublic Property Let myTest(newTest As String)
strT = newTest
PropertyChanged "myTest"
End Property
Private Sub Class_ReadProperties(PropBag As PropertyBag)
myTest = PropBag.ReadProperty("myTest", myT)
End Sub
Private Sub Class_WriteProperties(PropBag As PropertyBag)
PropBag.WriteProperty "myTest", myTest, myT
End Sub
解决方案 »
- 在VB6.0中如何在运行时动态添加/修改菜单?
- 请教用vb如何将从excel中读出的四列数据写入一文本文件中
- 一键出招!!应该从哪入手??
- 怎么把做好的软件烧成光盘并生成相应序列号?要求每张光盘产生的序列号不同
- [讨论]帮忙分析一下,自己写的软件在某些win2k/xp机子上拨号上后马上就断开的原因![高手请进]
- 怎样得到别的程序的控件名
- 关与调用程序的问题!!!(VB)
- 怎么把Vb的随机记录文件转换成word文件!(表格形式)
- vb中如何灵活应用DATAGRID控件?help,请不吝赐教
- ???我有个小问题帮帮我
- 如何实现这种效果的打印,主表每页都打印在页面上部,子表一页打不开时,换页继续接着打?(用active reports 实现)
- 读取ini文件请教高人,谢谢!!!
将对象以参数形式传递到 COM+ 列队组件中
http://support.microsoft.com/kb/246627/zh-cn
程序关闭,一般来说,对象也应该释放,哪么WriteProperty又有什么用呢?
我是不明白瞎说,请高手来回答吧
private int A()
{
}
[code]
//以上代码测试UBB.....
[BanUBB]
using System;
private int A()
{
}
[/BanUBB]
[code]
//再次测试UBB.....