thank you very much!
I have no writed code of the control's event handlers.
I writed a control nameed TMCtrlPicText, the control Contains tpicshow.
my part of code:
- Code: Select all
type
TMCtrlPicText = class(TPanel)
private
{ Private declarations }
FFlash: TShockwaveFlash; //in deadlock testing ,assign the nill
FRxGif: TRxGIFAnimator; //in deadlock testing ,assign the nill
FPicShow: TPicShow;
FMovie: TActiveMovie; //in deadlock testing ,assign the nill
...
...
procedure TMCtrlPicText.Open(aContainer: TElementContainer; wait: boolean; timeset: integer);
begin
...
FPicShow := TPicShow.Create(self);
FPicShow.Parent := self;
FPicShow.Width := Width;
FPicShow.Height := Height;
FPicShow.Left := 0;
FPicShow.Top := 0;
FPicShow.Visible := false;
...
end;
destructor TMCtrlPicText.Destroy;
begin
...
FPicShow.Free;
inherited;
...
end;
procedure TMCtrlPicText.Play;
begin
...
FPicShow.Picture.Assign(TMPicText(FContainer.ElementList.Objects[FCurBusyElement]).GetBitmap);
Randomize;
FPicShow.Style := Random(170);
FPicShow.Execute;
Invalidate;
SetTimer(Handle,1,50,nil);
...
end;
procedure TMCtrlPicText.TimerTick(var Msg: TMessage);
begin
...
if FPicShow.Busy then
...
//check the control whether the 'busy' is false.If the 'busy' is false,my control is 'free'.
end;
the master code creat my control on-line ,waiting...,free,
Next the master line creat the control on-line again,assign another the value,plots the above process.
//Mod - Added code tags[/code]