www.pudn.com > d4psp31.zip > PlaybackTempoForm.pas, change:1998-11-01,size:1408b


unit PlaybackTempoForm; 
 
interface 
 
uses 
  Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, 
  StdCtrls, ExtCtrls, ComCtrls; 
 
const 
  WM_TEMPOCHANGE = WM_USER + $600; 
 
type 
  TfmPlaybackTempo = class(TForm) 
    Label1: TLabel; 
    TrackBar1: TTrackBar; 
    Panel1: TPanel; 
    btnReset: TButton; 
    btnClose: TButton; 
    procedure TrackBar1Change(Sender: TObject); 
    procedure FormClose(Sender: TObject; var Action: TCloseAction); 
    procedure FormDestroy(Sender: TObject); 
    procedure btnCloseClick(Sender: TObject); 
    procedure btnResetClick(Sender: TObject); 
  private 
    { Private declarations } 
  public 
    { Public declarations } 
  end; 
 
var 
  fmPlaybackTempo: TfmPlaybackTempo; 
 
implementation 
 
{$R *.DFM} 
 
procedure TfmPlaybackTempo.TrackBar1Change(Sender: TObject); 
begin 
  Panel1.Caption := IntToStr (TrackBar1.Position); 
  SendMessage (TForm (Owner).Handle, WM_TEMPOCHANGE, TrackBar1.Position, 0); 
end; 
 
procedure TfmPlaybackTempo.FormClose(Sender: TObject; 
  var Action: TCloseAction); 
begin 
  action := caFree; 
end; 
 
procedure TfmPlaybackTempo.FormDestroy(Sender: TObject); 
begin 
  fmPlaybackTempo := Nil 
end; 
 
procedure TfmPlaybackTempo.btnCloseClick(Sender: TObject); 
begin 
  Close 
end; 
 
procedure TfmPlaybackTempo.btnResetClick(Sender: TObject); 
begin 
  TrackBar1.Position := 100 
 
end; 
 
end.