Quantcast
Channel: VBForums - Visual Basic 6 and Earlier
Viewing all articles
Browse latest Browse all 21338

[RESOLVED] User Control Picture Error Problem

$
0
0
I have a user control with a picture property

User Control code:

Code:

  '
  '
Public Property Get Picture() As StdPicture
 Set Picture = UserControl.Picture
End Property

Public Property Let Picture(ByVal NewPicture As StdPicture)
 UserControl.Picture = NewPicture
 PropertyChanged "Picture"
End Property

Private Sub UserControl_ReadProperties(PropBag As PropertyBag)
 UserControl.Picture = PropBag.ReadProperty("Picture", Nothing)
End Sub

Private Sub UserControl_WriteProperties(PropBag As PropertyBag)
 PropBag.WriteProperty "Picture", UserControl.Picture, Nothing
End Sub
  '
  '

But I get an error 450 Wrong number of arguments or invalid property assignment in the Parent

Parent code:

Code:

  '
  '
UC(Index).Picture = LoadPicture("F:/User Control Project/Test.bmp")
  '
  '


Viewing all articles
Browse latest Browse all 21338

Trending Articles