FMX.MediaLibrary.TMessageDidFinishTakingImageFromLibrary
Delphi
TMessageDidFinishTakingImageFromLibrary = class(TMessage<TBitmap>);
C++
class PASCALIMPLEMENTATION TMessageDidFinishTakingImageFromLibrary : public System::Messaging::TMessage__1<Fmx::Graphics::TBitmap*>
Contents
Properties
Type | Visibility | Source | Unit | Parent |
---|---|---|---|---|
class | public | FMX.MediaLibrary.pas FMX.MediaLibrary.hpp |
FMX.MediaLibrary | FMX.MediaLibrary |
Description
Message that contains a picture that the user selected by request of your application.
When your application calls IFMXTakenImageService.TakeImageFromLibrary, this opens the device image library for the user to select a picture. After the user selects a picture and your application regains focus, a TMessageReceivedImagePath message is sent, followed by a TMessageDidFinishTakingImageFromLibrary message.
The Value of a TMessageDidFinishTakingImageFromLibrary message is a TBitmap containing the picture that the user selected.
TMessageDidFinishTakingImageFromLibrary messages are only sent if the call to IFMXTakenImageService.TakeImageFromLibrary does not specify an event handler for successfully taking a picture. However, even if you do specify this event handler, Android may unload your application while your user is selecting a picture. When your application regains focus, it might actually have restarted, and any event information passed on the call to IFMXTakenImageService.TakeImageFromLibrary is lost, which is why a TMessageDidFinishTakingImageFromLibrary message is sent instead.
Using Events Instead of Messages
Instead of using messages, you can pass an event handler for successfully taking a picture in your call to IFMXTakenImageService.TakeImageFromLibrary. See When to Use Messages.
Platform Support
FireMonkey only sends this type of message on Android.
See Also
- System.Messaging.TMessage
- FMX.Graphics.TBitmap
- FMX.MediaLibrary.IFMXTakenImageService.TakeImageFromLibrary
- System.Messaging (Delphi) code example
- System.Messaging (C++) code example