Hallo
Ich wollte ein refresh für meinen Panel mit dieser Funktion machen :
Delphi-Quellcode:
procedure TForm1.FormCreate(Sender: TObject);
begin
Application.OnRestore := ShowDummy(trsPanel1);// error Untyped Pointer or Parameter !
Application.OnMinimize := ShowDummy(trsPanel1);
end;
Delphi-Quellcode:
procedure ShowDummy(C: TControl);
var
PF: TCustomForm;
procedure SC_(WC: TWinControl);
var I: Integer;
begin
WC.Invalidate;
for I := 0 to WC.ControlCount - 1 do
begin
if WC.Controls[I] is TWinControl then
SC_(WC.Controls[I] as TWinControl)
else
WC.Controls[I].Invalidate;
end;
end;
begin
if not (csDesigning in C.ComponentState) then
begin
if C is TForm then
PF := (C as TForm)
else
PF := GetParentForm(C);
if PF <> nil then
SC_(PF);
end;
end;