[Lazarus] LclVLC usage questions for switching from PasLibVLC

Bo Berglund bo.berglund at gmail.com
Sun Nov 19 14:56:27 CET 2023


On Sun, 19 Nov 2023 14:50:34 +0100, Bo Berglund via lazarus
<lazarus at lists.lazarus-ide.org> wrote:

>procedure TfrmMainVlc.FormCreate(Sender: TObject);
>begin
>  FPlayer:=TLCLVLCPlayer.Create(Self);
>  FPlayer.ParentWindow:=PVideo;
>  FPlayer.OnPositionChanged:=@DoPositionChanged; //Set event handler
>  FVideoFile := ReadIniString('Files', 'LastVideo', ''); //Get last video name
>  FEVideo.FileName := FVideoFile;
>  tbVolume.Position := ReadIniInt('Settings', 'Volume', 10); //Get last volume
>end;

Sorry, in actual fact I have this in the FormCreate:

procedure TfrmMainVlc.FormCreate(Sender: TObject);
begin
  FPlayer:=TLCLVLCPlayer.Create(Self);
  FPlayer.ParentWindow:=PVideo;
  FPlayer.OnPositionChanged:=@DoPositionChanged;
  FVideoFile := ReadIniString('Files', 'LastVideo', '');
  FEVideo.FileName := FVideoFile;
  tbVolume.Position := ReadIniInt('Settings', 'Volume', 10);
  FPlayer.UseEvents:=True; // Enable events
end;

The last line was added *after* I copied the function to the list message....

-- 
Bo Berglund
Developer in Sweden



More information about the lazarus mailing list