>>我应该怎样在Delphi做这做编码转换呢,
Delphi中应该有这个编码转换的函数,具体查查书。
>>如VB中有能完成BIG5与GB2312互换的函数,Delphi中有吗?
VB有这个功能是因为有这个OCX控件吧,你可以把这个控件按装在
Delphi的Activex页也照样可以用.这类控件也很多
Delphi中应该有这个编码转换的函数,具体查查书。
>>如VB中有能完成BIG5与GB2312互换的函数,Delphi中有吗?
VB有这个功能是因为有这个OCX控件吧,你可以把这个控件按装在
Delphi的Activex页也照样可以用.这类控件也很多
你可以找找这类的VCL控件
VB那是因为他有中文版,是专对中国使用的。
Delphi是通用的。
GB和BIG5的转换功能的函数到处都有,随便找一网站下载就行了
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
StdCtrls, ExtCtrls, IdBaseComponent, IdComponent, IdTCPConnection,
IdTCPClient, IdMessageClient, IdSMTP, IdMessage,IdStackConsts;type
TForm1 = class(TForm)
Edit1: TEdit;
Edit2: TEdit;
Edit3: TEdit;
Label1: TLabel;
Label2: TLabel;
Label3: TLabel;
Edit4: TEdit;
Panel1: TPanel;
Edit5: TEdit;
Edit6: TEdit;
Label4: TLabel;
Label5: TLabel;
Label6: TLabel;
Label7: TLabel;
Memo1: TMemo;
Button1: TButton;
IdSMTP1: TIdSMTP;
CheckBox1: TCheckBox;
Memo2: TMemo;
Button2: TButton;
IdMessage1: TIdMessage;
procedure Button1Click(Sender: TObject);
procedure IdSMTP1Connected(Sender: TObject);
procedure IdSMTP1Status(axSender: TObject; const axStatus: TIdStatus;
const asStatusText: String);
procedure IdSMTP1Work(Sender: TObject; AWorkMode: TWorkMode;
const AWorkCount: Integer);
procedure IdSMTP1WorkBegin(Sender: TObject; AWorkMode: TWorkMode;
const AWorkCountMax: Integer);
procedure IdSMTP1WorkEnd(Sender: TObject; AWorkMode: TWorkMode);
procedure Button2Click(Sender: TObject);
procedure FormCreate(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;var
Form1: TForm1;implementation{$R *.DFM}procedure TForm1.Button1Click(Sender: TObject);
begin
if checkbox1.Checked then IdSMTP1.AuthenticationType := atLogin
else IdSMTP1.AuthenticationType := atNone;
IdSMTP1.Host:=edit1.Text;
IdSMTP1.Port:=25;
IdSMTP1.UserId:=edit2.Text;
IdSMTP1.Password:=edit3.Text; IdSMTP1.Connect;
with IdMessage1 do
begin
body.Clear;
Body.Add(memo1.Lines.Text);//内容
From.Text := edit6.Text;
Recipients.EMailAddresses :=edit4.Text;//收件人
Subject:=edit5.Text;//主题 end;
IdSMTP1.Send(IdMessage1);
IdSmtp1.Disconnect;end;procedure TForm1.IdSMTP1Connected(Sender: TObject);
begin
memo2.Lines.Add('已经连接到服务器');
//IdMessage1.Body:=memo2.Lines;
end;procedure TForm1.IdSMTP1Status(axSender: TObject;
const axStatus: TIdStatus; const asStatusText: String);
begin
memo2.Lines.Add(asStatusText);
end;procedure TForm1.IdSMTP1Work(Sender: TObject; AWorkMode: TWorkMode;
const AWorkCount: Integer);
begin
memo2.Lines.Add(inttostr(AWorkCount));
end;procedure TForm1.IdSMTP1WorkBegin(Sender: TObject; AWorkMode: TWorkMode;
const AWorkCountMax: Integer);
begin
memo2.Lines.Add(inttostr(AWorkCountMax));
end;procedure TForm1.IdSMTP1WorkEnd(Sender: TObject; AWorkMode: TWorkMode);
begin
Memo2.Lines.Add('end');
end;procedure TForm1.Button2Click(Sender: TObject);
begin
IdSMTP1.Disconnect;
end;end.
我上次自己用明明可以的呀!
NMHTTP1.InputFileMode:=False;
NMHTTP1.OutputFileMode:=True; //此属性必须为True
NMHTTP1.ReportLevel:=Status_Basic;
NMHTTP1.Post('http://127.0.0.1/test.asp','tmp.txt');