Passing a control object to ActiveX control? 
Author Message
 Passing a control object to ActiveX control?

Hi, Sir/Madam,

Could you give me some clues about passing a picture box object to an
ActiveX control method?

Or alternatively:

Could you tell me how to reference a picture box which is the container
of a user-defined ActiveX control object?

Background:
I am writing an ActiveX control in VB5.0. I would like the control to be
used on a picture box(e.g. Picture1) which is in turn on a form (e.g.
Form1). The picture box, Picture1, is the container of the ActiveX
control object. I would like to draw graphics within the ActiveX control
onto the picture box, Picture1.

In short, there is a form called Form1; on Form1 there is picture box
called Picture1; on Picture1 there is an ActiveX control object. Whithin
a method of the ActiveX control, I would like to draw graphics on
Picture1.

Problem:
When I use " Extender.Parent.Name", I think the value should be
"Picture1", but in fact it gives me "Form1". How can I reference the
Picture1?

Alternatively, is it possible to pass Picture1 as a parameter to the
ActiveX control method? (I tried this but not successful)

Your help would be highly appreciated.

Charlie



Tue, 06 Jun 2000 03:00:00 GMT  
 Passing a control object to ActiveX control?

Yes, you will need to pass it in as object though.

Public Sub Foo(pbxPicture as Object)

This is somewhat slow, however, as it will use IDispatch (Late) Binding.

--
The views expressed by me are not the views of my employer

Quote:

>Hi, Sir/Madam,

>Could you give me some clues about passing a picture box object to an
>ActiveX control method?

>Or alternatively:

>Could you tell me how to reference a picture box which is the container
>of a user-defined ActiveX control object?

>Background:
>I am writing an ActiveX control in VB5.0. I would like the control to be
>used on a picture box(e.g. Picture1) which is in turn on a form (e.g.
>Form1). The picture box, Picture1, is the container of the ActiveX
>control object. I would like to draw graphics within the ActiveX control
>onto the picture box, Picture1.

>In short, there is a form called Form1; on Form1 there is picture box
>called Picture1; on Picture1 there is an ActiveX control object. Whithin
>a method of the ActiveX control, I would like to draw graphics on
>Picture1.

>Problem:
>When I use " Extender.Parent.Name", I think the value should be
>"Picture1", but in fact it gives me "Form1". How can I reference the
>Picture1?

>Alternatively, is it possible to pass Picture1 as a parameter to the
>ActiveX control method? (I tried this but not successful)

>Your help would be highly appreciated.

>Charlie




Tue, 06 Jun 2000 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. HOW TO: Pass Form/Control Objects to ActiveX Control

2. Passing Objects to ActiveX Control

3. How to pass a VB intrinsic Control as parameter to an ActiveX control (UserControl)

4. Passing ActiveX control as a parrameter to ActiveX.dll

5. Removing ActiveX Control and other ActiveX objects from the registry

6. Accessing activex control from another activex object in ie5 (vb 6)

7. ActiveX Control Container for VBCCE5 ActiveX Controls!?

8. Problem in VBA with ActiveX control that contains another ActiveX control

9. Hosting a WebBrowser Control Inside ActiveX Document or ActiveX Control to be Ho

10. ActiveX control within ActiveX control Licencing Error 429

11. Embedding licensed ActiveX Controls within a VB ActiveX Control

12. W2K Doesn't Load ActiveX Control But W98 and WXP Do Load ActiveX Control Correctly

 

 
Powered by phpBB® Forum Software