首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > .NET > .NET >

ShellExecute统制邮件换行

2012-07-29 
ShellExecute控制邮件换行请教如下代码:ShellExecute(handle, ‘open’, ‘ mailto:who@mail.neu.edu.cn?subj

ShellExecute控制邮件换行
请教如下代码:
ShellExecute(handle, ‘open’, ‘ mailto:who@mail.neu.edu.cn?subject=Hello&Body=This is a test’+#13+#10, nil, nil, 
SW_SHOWNORMAL);
当中的邮件正文无法换行,那个#13#10完全不起作用,请教如何才可以换行的方法!

[解决办法]
以下代码测试OK:


Delphi(Pascal) code
unit Unit1;interfaceuses  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,  Dialogs,ShellAPI, StdCtrls;type  TForm1 = class(TForm)    Button1: TButton;    procedure Button1Click(Sender: TObject);  private    { Private declarations }  public    { Public declarations }  end;var  Form1: TForm1;implementation{$R *.dfm}procedure TForm1.Button1Click(Sender: TObject);begin  ShellExecute(handle,'open', 'mailto:who@mail.neu.edu.cn?subject=Hello&Body=This is a test email1%0aThis is a test email2%0aThis is a test email3', nil, nil,SW_SHOWNORMAL);end;end. 

热点排行