| Herd Software Development
DaVinci Graphics Library
DaVinci Documentation Home Search Order

TWAINAquire method

Properties Methods Events Overview


procedure TWAINAquire(ShowUserInterface: Bool; uBitCount : Cardinal);


Begins the acquisition procedure from a connected TWAIN device. If ShowUserInterface is True, then the user will be allowed to select an alternate device from their default TWAIN device, and the device's interface software will be shown onscreen to allow for interactive acquisition. If ShowUserInterface is False, the acquisition begins immediately and unconditionally, and no user interaction is permitted.

Note: As shown in the example, this method is normally executed after disabling the control's parent form, essentially making acquisition a modal process to the current form. (See the DAVDELPH.PAS example for additional assistance with nonmodal acquisition.)


TWAINAquire requires disabling of the TDavinci component's parent form during execution to prevent unwanted message handling and user interaction.
procedure TMainForm.mnuFileAquireClick(Sender: TObject);
   { Disable the form while acquisition is in progress... }
   With Mainform do begin

   { Open the TWAIN Dialog and acquire the image }
     Imagine.TWAINAquire(TRUE, 0);

   { Re-enable parent form on completion }

See also:

TWAINInitialize function (Leonardo)

TWAINAquireExt function (Leonardo)