About the event of AXControlSite.

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

About the event of AXControlSite.

Takeya Suzuki
Hi,
I am sorry in poor English.

I made OCX by VB6(SP5).
The next code executed.

 | shell host mscal |
 shell := ShellView new
   layoutManager: BorderLayout new;
   create;
   extent: 170@60;
   yourself.
 host := AXControlSite new
   progId: 'EventTest.UserControl1';
   parentView: shell;
   arrangement: #center;
   create; show;
   yourself.
 shell show.
 host presenter when: #EventTest send: #bell to: Sound.
 mscal := host controlDispatch.

But, an event can't be caught.
There is no problem in the MS calendar .OCX.
What should I do?

Regards

Takeya Suzuki


Reply | Threaded
Open this post in threaded view
|

Re: About the event of AXControlSite.

Blair McGlashan
Takeya Suzuki

You wrote in message news:9ousd9$ft0b1$[hidden email]...

> Hi,
> I am sorry in poor English.
>
> I made OCX by VB6(SP5).
> The next code executed.
>
>  | shell host mscal |
>  shell := ShellView new
>    layoutManager: BorderLayout new;
>    create;
>    extent: 170@60;
>    yourself.
>  host := AXControlSite new
>    progId: 'EventTest.UserControl1';
>    parentView: shell;
>    arrangement: #center;
>    create; show;
>    yourself.
>  shell show.
>  host presenter when: #EventTest send: #bell to: Sound.
>  mscal := host controlDispatch.
>
> But, an event can't be caught.
> There is no problem in the MS calendar .OCX.
> What should I do?

Try loading your OCX in the 'Active-X Control Browser' tool on the
'Additional Tools' menu. At the bottom of the view you should see a trace of
any events generated by the control. Above that on the right there will be a
list of the events that the OCX claims to be publishing in its type
information. Hovering over these will show more detail. Compare what you see
for your own OCX against the MS Calendar Control.

One possible explanation is that the event doesn't actually come through as
'EventTest', but some other name. You should be able to determine the
correct event names to use in the A-X Control Browser (they can be copied
and pasted from the event list pane to avoid transcription errors).

Regards

Blair


Reply | Threaded
Open this post in threaded view
|

Re: About the event of AXControlSite.

Takeya Suzuki
Blair,
Thank you for your answer.

> Try loading your OCX in the 'Active-X Control Browser' tool on the
> 'Additional Tools' menu. At the bottom of the view you should see a trace
of
> any events generated by the control. Above that on the right there will be
a
> list of the events that the OCX claims to be publishing in its type
> information. Hovering over these will show more detail. Compare what you
see
> for your own OCX against the MS Calendar Control.

It has already been tested with Active-X Control Browser.
#EventTest appears in eventNamesPresenter.
But, it doesn't appear in traceWindow.
All the things which I made with VB are the same.
Why?

Regards

Takeya Suzuki