How to write listener on event of tlb

Posted by gdb390 on 26-Apr-2013 02:45

Hello,

I have a TLB called EFTNET.tlb.

I can open it in the com object viewer and see all the properties & events. (see attach1)

In a procedure I can instantiate the com-handle.

CREATE "EFTNET.EFT" <com-handle>.

I can set the properties, no problem.

There is also an event, called StateChanged ().

According to the com object viewer, the signature should be like (attach 2 )

PROCEDURE <event-proc-prefix>.StateChanged :
    DEFINE INPUT PARAMETER sender AS <ANYTYPE>.
    DEFINE INPUT PARAMETER e AS COM-HANDLE.
END PROCEDURE.

What should  <event-proc-prefix> be replaced with ?

kind regards

gerd

attach1.png

attach2.png

All Replies

Posted by cverbiest on 26-Apr-2013 07:04

Can you add the control to a window ? That could give an idea how the prefix is constructed.

When there is a control-frame the prefix is

CFName.OCXName

where CFName is the value of the Control frame CFVariable:Name.

Not exactly the same but it may point you in the right direction.

Posted by asthomas on 26-Apr-2013 07:08

I am out of the office until April 29th 2013. I will not be checking my mail and phone on a regular basis, but will reply to your mail as soon as I can.

If you need support from appSolutions, please send your mails to support@app-solutions.com.

If you need Roundtable support, please send mails to :

support-europe@roundtable-tsms.com.

Jeg er væk fra kontoret indtil den 29. april 2013, og checker ikke mail og telefon regelmæssigt. Jeg vil dog svare på din mail så snart som muligt.

Hvis du har behov for support, kontakt venligst support@app-solutions.com, så vender vi tilbage så snart det er muligt.

Administrative henvendelser kan ske til : admin@app-solutions.com.

Med venlig hilsen / Regards

Thomas Hansen

appSolutions a/s

Posted by gdb390 on 26-Apr-2013 07:14

Problem is that there are no controls in the tlb, so I can not place them on screen

that was my initial thought also ...

Gerd

Posted by Admin on 26-Apr-2013 07:18

What should  be replaced with ?

How about "gdb" ?

It's your choice....

:ENABLE-EVENTS ("gbd") .

Posted by gdb390 on 26-Apr-2013 07:27

Hey Mike,

Thanks for the tip !

I will try this out, and let you know !

Didn't know the existence of enable-events !   Shame on me , I suppose !

Gerd

This thread is closed