VB 窗体如何引用UserControl上的image的picture属性
本帖最后由 bcrun 于 2013-04-26 08:43:57 编辑
’UserControlVB UserControl 引用 属性 image
Public Property Get Image1Picture() As String
Image1Picture = Image1.Picture
End Property
Public Property Let Image1Picture(ByVal New_Image1Picture As String)
Image1.Picture() = New_Image1Picture
PropertyChanged "Image1Picture"
End Property
’他说类型不匹配
'form
Form2.UserControl11(0).Image1Picture = LoadPicture(App.Path & "" & "图\form2的\2.jpg")
'咋办啊!!!!!!!
’UserControl
Public Property Get Image1Picture() As StdPicture
Set Image1Picture = Image1.Picture
End Property
Public Property Let Image1Picture(ByVal New_Image1Picture As StdPicture)
Set Image1.Picture = New_Image1Picture
PropertyChanged "Image1Picture"
End Property
'form
Form2.UserControl11(0).Image1Picture = LoadPicture(App.Path & "" & "图\form2的\2.jpg")