jvcl: Add example for JvBmpAnimator

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@6653 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
wp_xxyyzz
2018-09-26 07:23:00 +00:00
parent 9f9e208fcd
commit db62cc2003
4 changed files with 8604 additions and 0 deletions

View File

@ -0,0 +1,82 @@
<?xml version="1.0" encoding="UTF-8"?>
<CONFIG>
<ProjectOptions>
<Version Value="11"/>
<PathDelim Value="\"/>
<General>
<Flags>
<UseDefaultCompilerOptions Value="True"/>
</Flags>
<SessionStorage Value="InProjectDir"/>
<MainUnit Value="0"/>
<Title Value="BmpAnimDemo"/>
<Scaled Value="True"/>
<ResourceType Value="res"/>
<UseXPManifest Value="True"/>
<XPManifest>
<DpiAware Value="True"/>
</XPManifest>
<Icon Value="0"/>
</General>
<BuildModes Count="1">
<Item1 Name="Default" Default="True"/>
</BuildModes>
<PublishOptions>
<Version Value="2"/>
<UseFileFilters Value="True"/>
</PublishOptions>
<RunParams>
<FormatVersion Value="2"/>
<Modes Count="0"/>
</RunParams>
<RequiredPackages Count="2">
<Item1>
<PackageName Value="JvMMLazR"/>
</Item1>
<Item2>
<PackageName Value="LCL"/>
</Item2>
</RequiredPackages>
<Units Count="2">
<Unit0>
<Filename Value="BmpAnimDemo.lpr"/>
<IsPartOfProject Value="True"/>
</Unit0>
<Unit1>
<Filename Value="BmpAnimMainFormU.pas"/>
<IsPartOfProject Value="True"/>
<HasResources Value="True"/>
</Unit1>
</Units>
</ProjectOptions>
<CompilerOptions>
<Version Value="11"/>
<PathDelim Value="\"/>
<Target>
<Filename Value="BmpAnimDemo"/>
</Target>
<SearchPaths>
<UnitOutputDirectory Value="lib\$(TargetCPU)-$(TargetOS)"/>
</SearchPaths>
<Linking>
<Options>
<Win32>
<GraphicApplication Value="True"/>
</Win32>
</Options>
</Linking>
</CompilerOptions>
<Debugging>
<Exceptions Count="3">
<Item1>
<Name Value="EAbort"/>
</Item1>
<Item2>
<Name Value="ECodetoolError"/>
</Item2>
<Item3>
<Name Value="EFOpenError"/>
</Item3>
</Exceptions>
</Debugging>
</CONFIG>

View File

@ -0,0 +1,14 @@
program BmpAnimDemo;
uses
Interfaces,
Forms,
BmpAnimMainFormU in 'BmpAnimMainFormU.pas' {BmpAnimMainForm};
{$R *.RES}
begin
Application.Initialize;
Application.CreateForm(TBmpAnimMainForm, BmpAnimMainForm);
Application.Run;
end.

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,88 @@
{******************************************************************
JEDI-VCL Demo
Copyright (C) 2002 Project JEDI
Original author:
You may retrieve the latest version of this file at the JEDI-JVCL
home page, located at http://jvcl.delphi-jedi.org
The contents of this file are used with permission, subject to
the Mozilla Public License Version 1.1 (the "License"); you may
not use this file except in compliance with the License. You may
obtain a copy of the License at
http://www.mozilla.org/MPL/MPL-1_1Final.html
Software distributed under the License is distributed on an
"AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
implied. See the License for the specific language governing
rights and limitations under the License.
******************************************************************}
unit BmpAnimMainFormU;
interface
uses
SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
ExtCtrls, Menus, ComCtrls, StdCtrls, ImgList, JvBmpAnimator;
type
TBmpAnimMainForm = class(TForm)
EdFrame: TEdit;
UDFrame: TUpDown;
BtnOnOff: TButton;
BmpAnimator: TJvBmpAnimator;
EdSpeed: TEdit;
UDSpeed: TUpDown;
LblFrame: TLabel;
LblSpeed: TLabel;
Images: TImageList;
CbTransparent: TCheckBox;
procedure BtnOnOffClick(Sender: TObject);
procedure EdFrameChange(Sender: TObject);
procedure EdSpeedChange(Sender: TObject);
procedure CbTransparentClick(Sender: TObject);
end;
var
BmpAnimMainForm: TBmpAnimMainForm;
implementation
{$R *.lfm}
procedure TBmpAnimMainForm.BtnOnOffClick(Sender: TObject);
begin
with BmpAnimator do
begin
Active := not Active;
if not Active then
Position := 0;
end;
end;
procedure TBmpAnimMainForm.CbTransparentClick(Sender: TObject);
begin
BmpAnimator.Transparent := CbTransparent.Checked;
end;
procedure TBmpAnimMainForm.EdFrameChange(Sender: TObject);
begin
if not BmpAnimator.Active then
BmpAnimator.Position := UDFrame.Position;
end;
procedure TBmpAnimMainForm.EdSpeedChange(Sender: TObject);
begin
try
BmpAnimator.Speed := StrToInt(EdSpeed.Text);
except
BmpAnimator.Speed := 15;
end;
end;
end.