Vcl.ShareContract.TCustomSharingContract.OnAppChosen
Delphi
property OnAppChosen: TApplicationChosenEvent read GetOnAppChosen write SetOnAppChosen;
C++
__property System::Win::Sharecontract::TApplicationChosenEvent OnAppChosen = {read=GetOnAppChosen, write=SetOnAppChosen};
Properties
Type | Visibility | Source | Unit | Parent |
---|---|---|---|---|
event | public | Vcl.ShareContract.pas Vcl.ShareContract.hpp |
Vcl.ShareContract | TCustomSharingContract |
Description
Occurs when a user selects a target application to receive the shared information.
There is only one property that you can retrieve from this event handler: the name of the application that the user selects.
The following code snippet demonstrates how to do that.
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));
}