Slink-e / CDJ Discussion Archive #8
Re: Delphi and Active X events
Posted By: Jon Welfringer <JWelfringer@s...> In Response To: Re: Delphi and Active X events (Dennis Laslo)
In Response To: Re: Delphi and Active X events (Dennis Laslo)
Your code looks fine. I'll include my SLINKXLib_TLB.pas file for you to compare with yours. Did you import the OCX in a previous version of Delphi? D3 had problems generating the proper TLB file.
As a test to see if anything gets passed to the event, move your Listbox.Items.Add statement to the top. Add the line to the list regardless if it matches your IF statements.
Also, what do your 'device add' lines look like? Here's what I use. Notice the $FFF so it reports events from all ports. procedure TForm1.FormCreate(Sender: TObject); begin
Slinkx1.AddDevice('sonydvd', 'Sonydvd.cde', 1, 1, $FFF) ;
Slinkx1.ReportNoMatch := 1 ; end;
I'll forward the IrHelper program under separate e-mail to you.