delphi xe10 消息操作
Posted guorongtao
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了delphi xe10 消息操作相关的知识,希望对你有一定的参考价值。
//消息提醒(从手机屏幕顶部向下滑动,出现的提示消息) NotificationC: TNotificationCenter; procedure TNotificationsForm.btnSendNotificationImmediatelyClick( Sender: TObject); var Notification: TNotification; begin verify if the service is actually supported if NotificationC.Supported then begin Notification := NotificationC.CreateNotification; try Notification.Name := ‘MyNotification‘; Notification.AlertBody := ‘Delphi for Mobile is here!‘; Notification.FireDate := Now; //可修改发送消息时间 Send notification in Notification Center NotificationC.ScheduleNotification(Notification); also this method is equivalent // NotificationService.PresentNotification(Notification); finally Notification.DisposeOf; end; end end; if NotificationC.Supported then NotificationC.CancelNotification(‘MyNotification‘); //取消消息 NotificationC.CancelAll; //取消所有消息
以上是关于delphi xe10 消息操作的主要内容,如果未能解决你的问题,请参考以下文章
delphi xe10 手机内部系统相关操作(手机信息震动剪贴板键盘电话拨号)
Delphi XE10.1 引用计数(Delphi XE10.1 Berlin终于增加了对接口的Weak, UnSafe的支持)