procedure clearEdt(Frm: Tform); var i:integer; begin //清空窗体上所有edit,tcombobox,tmemo with Frm do begin for i:=0 to ComponentCount-1 do begin if (Components[i] is tedit) then (Components[i] as tedit).text:=''; if (Components[i] is tcombobox) then (Components[i] as tcombobox).text:=''; if (Components[i] is tmemo) then (Components[i] as tmemo).text:=''; end; end; end;