|
-
Feb 24th, 2000, 01:53 PM
#1
Thread Starter
New Member
I am trying to create an ActiveX control which lets the user scroll a text box. It is my custom made scroll bar and I would like to give the user the ability to customize images for eg. UP image and DOWN image. The problem is going through the active x ctrl Interface wizard makes everything I want, sets all the Write Property bags and read property bags, which means everything practically works in Design time, it's just when I flick to run time the images are back to the default (I guess it's not saving them).
This is my testing code, can anyone make this work?
'MappingInfo=Image1,Image1,-1,Picture
Public Property Get Picture() As Picture
Set Picture = Image1.Picture
End Property
Public Property Set Picture(ByVal New_Picture As Picture)
Set Image1.Picture = New_Picture
PropertyChanged "Picture"
End Property
'WARNING! DO NOT REMOVE OR MODIFY THE FOLLOWING COMMENTED LINES!
'MappingInfo=Image2,Image2,-1,Picture
Public Property Get UP() As Picture
Set UP = Image2.Picture
End Property
Public Property Set UP(ByVal New_UP As Picture)
Set Image2.Picture = New_UP
PropertyChanged "UP"
End Property
'Load property values from storage
Private Sub UserControl_ReadProperties(PropBag As PropertyBag)
Set Picture = PropBag.ReadProperty("Picture", Nothing)
Set Picture = PropBag.ReadProperty("UP", Nothing)
End Sub
'Write property values to storage
Private Sub UserControl_WriteProperties(PropBag As PropertyBag)
Call PropBag.WriteProperty("Picture", Picture, Nothing)
Call PropBag.WriteProperty("UP", Picture, Nothing)
End Sub
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|