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


TWAINAquire method

Properties Methods Events Overview

Declaration

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

Description

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.)

Example

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);
begin
   { Disable the form while acquisition is in progress... }
   With Mainform do begin
     Enabled:=FALSE;

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

   { Re-enable parent form on completion }
     Enabled:=TRUE;
   end;
end;

See also:

TWAINInitialize function (Leonardo)

TWAINAquireExt function (Leonardo)