Book Image

Expert Delphi - Second Edition

By : Marco Cantù, Paweł Głowacki
Book Image

Expert Delphi - Second Edition

By: Marco Cantù, Paweł Głowacki

Overview of this book

Master Delphi, the most powerful Object Pascal IDE and versatile component library for cross-platform native app development, by harnessing its capabilities for building natively compiled, blazingly fast apps for all major platforms, including Android, iOS, Windows, Mac, and Linux. Expert Delphi begins with a quick overview of Delphi, helping you get acquainted with the IDE and the Object Pascal language. The book then quickly progresses to more advanced concepts, followed by the architecture of applications and the FireMonkey library, guiding you through building server-side services, parallel programming, and database access. Toward the end, you’ll learn how to integrate your app with various web services and deploy them effectively. By the end of this book, you’ll be adept at building powerful, cross-platform, native apps for iOS, Android, Windows, and macOS—all from a single code base.
Table of Contents (21 chapters)
Free Chapter
1
Part 1: Building Blocks
6
Part 2: Going Mobile
12
Part 3: From Data to Services
19
Index

Taking photos

There are many occasions when it is useful to be able to take a photo from an app. The programming model is very easy, but it is not the TCamera component that you need to use. In FireMonkey, taking photos is achieved by executing a special take photo from camera action. The following steps take you through building a demo based on that action:

  1. Create a new blank multi-device FireMonkey application. Save the main form’s unit as uFormCam and the project as CamApp, and change the Name property of the form to FormCam.
  2. Change the Style setting in the combobox above the form to iOS or Android.
  3. Drop a TImage component on the form, rename it to ImagePhoto, and align it to Client.
  4. Add a TToolBar component and drop a TSpeedbutton onto the ToolBar1 control. Change its Name to SpdbtnTakePhoto and the button’s Stylelookup property to cameratoolbutton, align it to Left, and adjust the width so it becomes a square.
  5. Drop a TActionList component...