D是采用回调的方式实现取App信息的。
1.Uses FMX.PhoneDialer;
var
Appinfo : IFMXApplicationService ;
begin
if TPlatformServices.Current.SupportsPlatformService(IFMXApplicationService, IInterface(Appinfo)) then
begin
ShowMessage( Appinfo.GetDefaultTitle ); //app的名称
end;
本文介绍了一种在Delphi中使用回调方式获取应用程序信息的方法。通过调用TPlatformServices.Current.SupportsPlatformService来判断是否支持IFMXApplicationService接口,并通过该接口获取应用的默认标题。

1162

被折叠的 条评论
为什么被折叠?



