문제

There is a code:

var 
myobject: OleVariant;
begin
 myobject := CreateOleObject('SomeNamespace.SomeClass');
end;

This COM object has events (for example OnClick). How should I connect to these events without importing TLB?

도움이 되었습니까?

해결책

You are working with COM late-binding, so do you need write a lot of code to handle events. this task is not difficult if you know COM, basically do you need follow these steps.

you can found examples of this implementation on these links

try out these links for more info about COM, late-binding and events

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top