Q
qin_sir
Unregistered / Unconfirmed
GUEST, unregistred user!
这是我的thread:
unit SendMailThread;
interface
uses
Classes,Dialogs;
type
SendMail2Thread = class(TThread)
private
{ Private declarations }
protected
procedure Execute; override;
end;
implementation
uses MailUnit,NewMailUnit;
procedure SendMail2Thread.Execute;
begin
FreeOnTerminate:=True;
MailForm.SendMail(NewMailForm.SmtpServer,NewMailForm.MailMessage);
end;
end.
在NewMailUnit中有smtpserver和mailmessage全局变量,并且都是变量,使用如下:
for i:=0 to MailList.count -1 do
begin
TheOneThread:=SendMail2Thread.create(False);
end;
这个程序老是报错,不知道错在什么地方了,各位帮忙
unit SendMailThread;
interface
uses
Classes,Dialogs;
type
SendMail2Thread = class(TThread)
private
{ Private declarations }
protected
procedure Execute; override;
end;
implementation
uses MailUnit,NewMailUnit;
procedure SendMail2Thread.Execute;
begin
FreeOnTerminate:=True;
MailForm.SendMail(NewMailForm.SmtpServer,NewMailForm.MailMessage);
end;
end.
在NewMailUnit中有smtpserver和mailmessage全局变量,并且都是变量,使用如下:
for i:=0 to MailList.count -1 do
begin
TheOneThread:=SendMail2Thread.create(False);
end;
这个程序老是报错,不知道错在什么地方了,各位帮忙