Vcl.ShareContract.TSharingContract.OnAppChosen
Delphi
property OnAppChosen;
C++
__property OnAppChosen;
Properties
| Type | Visibility | Source | Unit | Parent |
|---|---|---|---|---|
| event | published | Vcl.ShareContract.pas Vcl.ShareContract.hpp |
Vcl.ShareContract | TSharingContract |
Description
Occurs when a user selects a target application to receive the shared information.
Vcl.ShareContract.TSharingContract.OnAppChosen inherits from Vcl.ShareContract.TCustomSharingContract.OnAppChosen. All content below this line refers to Vcl.ShareContract.TCustomSharingContract.OnAppChosen. 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));
}