Vcl.ShareContract.TSharingContract.OnAppChosen

De RAD Studio API Documentation
Aller à : navigation, rechercher

Delphi

property OnAppChosen;

C++

__property OnAppChosen;

Propriétés

Type Visibilité  Source Unité  Parent
event published
Vcl.ShareContract.pas
Vcl.ShareContract.hpp
Vcl.ShareContract TSharingContract

Description

Se produit lorsqu'un utilisateur sélectionne une application cible pour recevoir les informations partagées.

Vcl.ShareContract.TSharingContract.OnAppChosen hérite de Vcl.ShareContract.TCustomSharingContract.OnAppChosen. Tout le contenu en-dessous de cette ligne se réfère à Vcl.ShareContract.TCustomSharingContract.OnAppChosen. Se produit lorsqu'un utilisateur sélectionne une application cible pour recevoir les informations partagées.

Vous ne pouvez récupérer qu'une seule propriété à partir de ce gestionnaire d'événement : le nom de l'application sélectionnée par l'utilisateur.

L'extrait de code suivant montre la procédure à suivre.

Delphi :
procedure TForm1.ShareContractComponentAppChosen(const Sender: TObject; const AManager: IDataTransferManager;
  const Args: ITargetApplicationChosenEventArgs);
begin
  Memo1.Lines.Add('Target application name: ' + args.ApplicationName.ToString);
end;
C++ :
void __fastcall TForm1::SharingContractAppChosen(TObject * const Sender, IDataTransferManager * const AManager,
		  ITargetApplicationChosenEventArgs * const Args)
{
  Memo1->Lines->Add("Target application name: " + TWindowsString::HStringToString(Args->ApplicationName));
}

Voir aussi