| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 574 人关注过本帖
标题:vb6 用户控件 Picture 出错 求帮助呀。。
只看楼主 加入收藏
tan2831578
Rank: 1
等 级:新手上路
帖 子:1
专家分:0
注 册:2012-8-8
收藏
 问题点数:0 回复次数:1 
vb6 用户控件 Picture 出错 求帮助呀。。
Private Sub TTAMKJ1_Click() 'ttakj1 是用户控件的名称
 TTAMKJ.Picture = Picture1.Picture
 TTAMKJ.MaskPicture = Picture1.Picture
End Sub
用户控件代码:
Public Property Get Picture() As Picture
    Set Picture = UserControl.Picture
End Property

Public Property Set Picture(ByVal New_Picture As Picture)
    Set UserControl.Picture = New_Picture
    PropertyChanged "Picture"
End Property

'注意!不要删除或修改下列被注释的行!
'MappingInfo=UserControl,UserControl,-1,Image
Public Property Get Image() As Picture
    Set Image = UserControl.Image
End Property

'注意!不要删除或修改下列被注释的行!
'MemberInfo=8,0,0,
Public Property Get MaskColor() As Long
    MaskColor = UserControl.MaskColor
End Property

Public Property Let MaskColor(ByVal New_MaskColor As Long)
    UserControl.MaskColor = New_MaskColor
    PropertyChanged "MaskColor"
End Property

'注意!不要删除或修改下列被注释的行!
'MemberInfo=11,0,0,
Public Property Get MaskPicture() As Picture
    Set MaskPicture = UserControl.MaskPicture
End Property

Public Property Set MaskPicture(ByVal New_MaskPicture As Picture)
    Set UserControl.MaskPicture = New_MaskPicture
    PropertyChanged "MaskPicture"
End Property
Private Sub UserControl_ReadProperties(PropBag As PropertyBag)

    UserControl.BackColor = PropBag.ReadProperty("BackColor", &H0&)
    UserControl.BackStyle = PropBag.ReadProperty("BackStyle", 0)
    UserControl.BorderStyle = PropBag.ReadProperty("BorderStyle", 0)
    UserControl.ForeColor = PropBag.ReadProperty("ForeColor", &H80000012)
    UserControl.Enabled = PropBag.ReadProperty("Enabled", True)
    UserControl.FillStyle = PropBag.ReadProperty("FillStyle", 1)
    UserControl.FillColor = PropBag.ReadProperty("FillColor", &H0&)
    Set UserControl.Picture = PropBag.ReadProperty("Picture", Nothing)
    UserControl.MaskColor = PropBag.ReadProperty("MaskColor", 0)
    Set UserControl.MaskPicture = PropBag.ReadProperty("MaskPicture", Nothing)
    Set UserControl.Font = PropBag.ReadProperty("Font", Ambient.Font)
    m_Caption = PropBag.ReadProperty("Caption", m_def_Caption)
End Sub

'将属性值写到存储器
Private Sub UserControl_WriteProperties(PropBag As PropertyBag)

    Call PropBag.WriteProperty("BackColor", UserControl.BackColor, &H0&)
    Call PropBag.WriteProperty("BackStyle", UserControl.BackStyle, 0)
    Call PropBag.WriteProperty("BorderStyle", UserControl.BorderStyle, 0)
    Call PropBag.WriteProperty("MaskPicture", MaskPicture, 0)
    Call PropBag.WriteProperty("Picture", Picture, 0)
    Call PropBag.WriteProperty("ForeColor", UserControl.ForeColor, &H80000012)
    Call PropBag.WriteProperty("Enabled", UserControl.Enabled, True)
    Call PropBag.WriteProperty("FillStyle", UserControl.FillStyle, 1)
    Call PropBag.WriteProperty("FillColor", UserControl.FillColor, &H0&)
    Call PropBag.WriteProperty("Picture", Picture, Nothing)
    Call PropBag.WriteProperty("MaskColor", UserControl.MaskPicture, m_def_MaskColor)
    Call PropBag.WriteProperty("MaskPicture", UserControl.MaskPicture, Nothing)
    Call PropBag.WriteProperty("Font", UserControl.Font, Ambient.Font)
    Call PropBag.WriteProperty("Caption", m_Caption, m_def_Caption)
End Sub




不知道哪里出错 求指点!!
搜索更多相关主题的帖子: 用户 
2012-08-08 10:50
风吹过b
Rank: 20Rank: 20Rank: 20Rank: 20Rank: 20
等 级:贵宾
威 望:364
帖 子:4947
专家分:30084
注 册:2008-10-15
收藏
得分:0 
报什么错???

----------------------------------------
为了这个代码,去认真研究几十分钟作静态分析???估计没有人去干了,现在都是动态分析的。
为了这个代码,去猜测你的控件结构??? 那再没人去干了。

所以,问问题时,哪一行在运行时报错,报什么错,要发出来,大家才会去看看。

授人于鱼,不如授人于渔
早已停用QQ了
2012-08-08 16:44
快速回复:vb6 用户控件 Picture 出错 求帮助呀。。
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.018277 second(s), 9 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved