StrongM,
No luck with your code. Same 'object required' error in the same place.
Usually, when I get the obj req error it's because of a missing 'path' to the object.
Is there something special about referencing a usercontrol object from without?
I need your help here !
This is my first attempt with a usercontrol.
Please clue me in on just how I should expose the picture property. Step by step if you can.
StrongM: It still gives an 'object required' error
'=====================================================
TheVampire: The Property Code is in the UserControl
I want the picture in the control, not in a box in the control. Just like line 2 of the Set Pricture Property.
Public Property Set Picture(ByVal New_Picture As Picture)
Set UserControl.Picture = New_Picture
PropertyChanged "Picture"
End Property
'======================================================
Here's my current code.
v$ = "weissman.bmp"
SavePicture Graph.Image, v$
Set Picture1.Picture = Picture1.Picture
Set Picture = LoadPicture(v$)
'====================================================
I do not get an 'object req' error, because the picture is printed. However, it's in the form. I want it in usercontrol1.
Ok, I think we are getting to the point where you need to do a little research yourself, and read the help files about some of this stuff. You keep trying to modify the example code that has been provided back to some other form before we can get a view as to why such code doesn't work for you even though, for example, it works fine here.
It may be worth trying to walk before trying to run.
I bought a book that explains control creation. Although I've been creating exes for many years, activeXs are new to me and a little different.
Anyhow, from what I understand now, the form is used ONLY to test the control. After the test is over, the form is removed and then the project is compiled to make the ocx.
So,.... what I did, was to remove the form and put the command1 button (and the other objects) on the control. Now, of course, the picture is drawn on the control with errors.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.