Application.OnRestore, Onminimize

Résolu
Taktaky Messages postés 31 Date d'inscription lundi 21 mai 2007 Statut Membre Dernière intervention 21 août 2008 - 21 mai 2008 à 15:03
f0xi Messages postés 4205 Date d'inscription samedi 16 octobre 2004 Statut Modérateur Dernière intervention 12 mars 2022 - 21 mai 2008 à 21:23
Salut

je voudrais Refresh mon TrsPanel1 mais je ne peut pas compile the Programme :

procedure TForm1.FormCreate(Sender: TObject);
begin
Application.OnRestore := ShowDummy(trsPanel1);// error Untyped Parameter !
Application.OnMinimize := ShowDummy(trsPanel1);
end;

procedure ShowDummy(C: TControl);
var
PF: TCustomForm;
 
procedure SC_(WC: TWinControl);
var I: Integer;
begin
WC.Invalidate;
for I : = 0to WC.ControlCount - 1do
begin
if WC.Controls[I]is TWinControl then
SC_(WC.Controls[I]as TWinControl)
else
WC.Controls[I].Invalidate;
end;
end;
 
begin
ifnot(csDesigning in C.ComponentState)then
begin
if C is TForm then
PF := (C as TForm)
else
PF := GetParentForm(C);
if PF <> nilthen
SC_(PF);
end;
end;

1 réponse

f0xi Messages postés 4205 Date d'inscription samedi 16 octobre 2004 Statut Modérateur Dernière intervention 12 mars 2022 35
21 mai 2008 à 21:23
tu ne peu pas assigner une procedure a un gestionnaire d'evenement!

et si ton Panel est un TPanel, un simple trsPanel1.Refresh devrait suffire.

3
Rejoignez-nous