Registriert seit: 24. Mai 2003
Ort: Düsseldorf
196 Beiträge
Delphi 2009 Professional
|
Re: Checklistbox/Pop3 - Error Message ?
16. Feb 2005, 18:16
hi,
*g* ok
z.b.
Delphi-Quellcode:
public
var str: TStringlist;
Delphi-Quellcode:
procedure TForm1.FormCreate(Sender: TObject);
begin
str := TStringlist.Create
end;
Delphi-Quellcode:
procedure TForm1.FormClose(Sender: TObject; var Action: TCloseAction);
begin
str.Free
end;
Delphi-Quellcode:
procedure TForm1.ffnen1Click(Sender: TObject);
var I: integer;
begin
try
str.Clear;
for I := pop1.MessageCount - 1 downto 0 do
begin
pop1.RetrieveHeader(I);
if (checklistbox1.Items.IndexOf(Message1.Subject) = -1) and (Copy(Message1.Subject, 0, 4) = 'NEWS') then
begin
checklistbox1.Items.AddObject(Message1.Subject, Pointer(1));
str.Insert(0, IntToStr(I));
end
end
except
end
end;
Delphi-Quellcode:
procedure TForm1.BitBtn2Click(Sender: TObject);
var I: integer;
begin
try
with checklistbox1 do
begin
if Items.Count = 0 then Exit;
for I := 0 to Items.Count - 1 do
if checked[I] then pop1.retrieve(StrToInt(str.Strings[I]))
end
except
end
end;
Chris
D2009.4 | Vista SP2 x32
|