📄 sendsms.pas
字号:
unit SendSMS;
interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
StdCtrls,sms;
type
TfrmSendSMS = class(TForm)
txtDestination: TEdit;
btnSend: TButton;
Label24: TLabel;
mmoText: TMemo;
lblTo: TLabel;
procedure btnSendClick(Sender: TObject);
procedure FormCreate(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
frmSendSMS: TfrmSendSMS;
implementation
uses MainUnit;
{$R *.DFM}
procedure TfrmSendSMS.btnSendClick(Sender: TObject);
var
imsgLength:longint;
begin
imsgLength:=length(mmoText.text);
if imsgLength > 150 then
begin
if messageDlg('Your SMS Message is greater than 150 characters. Your message will be split into '+inttostr(trunc(imsgLength div 150)+1)+' Messages. Continue ?', mtWarning,[mbYes,mbNo],0)=mrYes then
frmMain.FBUS1.SMS.SendSMSMessage(txtDestination.text,mmoText.text,1,fbSMSClassNormal);
end
else
frmMain.FBUS1.SMS.SendSMSMessage(txtDestination.text,mmoText.text,1,fbSMSClassNormal);
end;
procedure TfrmSendSMS.FormCreate(Sender: TObject);
begin
mmoText.lines.Clear;
end;
end.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -