VB中写的类,如何保存他的所有属性到一定格式的文件中? 写一个套打程序,所有数据都是保存到类中的,如何把这个类中的所有数据保存到文件中,VC中有序列化,VB下怎么实现 ,有没有办法? 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 不清楚VC,但写到INI文件中也是很方便的.读出来也一样. XML想过的,只是有图片数据怎么办!,也可以么我看看 在 ReadProperties 事件中读取保存在PropertyBag 对象的数据在 WriteProperties 事件中写数据到PropertyBag 对象里 下面是我一个 图片按钮(是UserControl, class好像没有这个事件 不知道 直接定义一个PropertyBag 来保存数据行不行 小弟没试过)的 代码的一部分 楼主参考一下'读取所有保存在PropertyBag 对象的数据到相应的属性, 来初始化属性Private Sub UserControl_ReadProperties(PropBag As PropertyBag) Set PictureNormal = PropBag.ReadProperty("PictureNormal", Nothing) Set PictureDown = PropBag.ReadProperty("PictureDown", Nothing) Set PictureOver = PropBag.ReadProperty("PictureOver", Nothing) Shape = PropBag.ReadProperty("Shape", sb_stlEllipse) AutoSize = PropBag.ReadProperty("AutoSize", False) BackColor = PropBag.ReadProperty("BackColor", False) WidthEllipse = PropBag.ReadProperty("WidthEllipse", 20) HeightEllipse = PropBag.ReadProperty("HeightEllipse", 20)End Sub'保存属性值到PropertyBag里 以便下次启动时 来恢复其值Private Sub UserControl_WriteProperties(PropBag As PropertyBag) Call PropBag.WriteProperty("PictureNormal", PictureNormal, Nothing) Call PropBag.WriteProperty("PictureDown", PictureDown, Nothing) Call PropBag.WriteProperty("PictureOver", PictureOver, Nothing) Call PropBag.WriteProperty("Shape", Shape, sb_stlEllipse) Call PropBag.WriteProperty("AutoSize", AutoSize, False) Call PropBag.WriteProperty("BackColor", BackColor, False) Call PropBag.WriteProperty("WidthEllipse", WidthEllipse, 20) Call PropBag.WriteProperty("HeightEllipse", HeightEllipse, 20)End Sub 只读属性不能赋值 这是一段VB6的代码,谁能给翻译成C语言 这是关于串口接收数据的吗??求解 很菜的问题 treeview控件如何单击右键弹出菜单? 哪位高人给我指点一下,用OSfCreateShellLink()API怎么建立快捷方式 第二问[学习vb数载仍有数个问题从初学至今没有答案,不知各位高手大虾有谁知道] 如何获取鼠标在屏幕上的当前位置和每隔一段时间移动鼠标到指定位置? 请问高手,VB编程中msgbox中的字体想改变大点该如何做? 关于Function的问题,提示类型不匹配 使用什么方法传递一个比较大的文本字符串到一个网址? 求助:Runtime Error!
我看看
在 WriteProperties 事件中写数据到PropertyBag 对象里
Private Sub UserControl_ReadProperties(PropBag As PropertyBag)
Set PictureNormal = PropBag.ReadProperty("PictureNormal", Nothing)
Set PictureDown = PropBag.ReadProperty("PictureDown", Nothing)
Set PictureOver = PropBag.ReadProperty("PictureOver", Nothing)
Shape = PropBag.ReadProperty("Shape", sb_stlEllipse)
AutoSize = PropBag.ReadProperty("AutoSize", False)
BackColor = PropBag.ReadProperty("BackColor", False)
WidthEllipse = PropBag.ReadProperty("WidthEllipse", 20)
HeightEllipse = PropBag.ReadProperty("HeightEllipse", 20)
End Sub'保存属性值到PropertyBag里 以便下次启动时 来恢复其值
Private Sub UserControl_WriteProperties(PropBag As PropertyBag)
Call PropBag.WriteProperty("PictureNormal", PictureNormal, Nothing)
Call PropBag.WriteProperty("PictureDown", PictureDown, Nothing)
Call PropBag.WriteProperty("PictureOver", PictureOver, Nothing)
Call PropBag.WriteProperty("Shape", Shape, sb_stlEllipse)
Call PropBag.WriteProperty("AutoSize", AutoSize, False)
Call PropBag.WriteProperty("BackColor", BackColor, False)
Call PropBag.WriteProperty("WidthEllipse", WidthEllipse, 20)
Call PropBag.WriteProperty("HeightEllipse", HeightEllipse, 20)
End Sub