Vcl.ShareContract.TCustomSharingContract.OnAppChosen

De RAD Studio API Documentation
Aller à : navigation, rechercher

Delphi

property OnAppChosen: TApplicationChosenEvent read GetOnAppChosen write SetOnAppChosen;

C++

__property System::Win::Sharecontract::TApplicationChosenEvent OnAppChosen = {read=GetOnAppChosen, write=SetOnAppChosen};

Propriétés

Type Visibilité  Source Unité  Parent
event public
Vcl.ShareContract.pas
Vcl.ShareContract.hpp
Vcl.ShareContract TCustomSharingContract


Description

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