On Sun, 19 Nov 2023 14:50:34 +0100, Bo Berglund via lazarus
<lazarus@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

-- 
_______________________________________________
lazarus mailing list
lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus

Reply via email to