*!* The following example uses the Lead OCX (ThisForm.oleLead) to aquire an *!* image through the Twain interface. LOCAL llLastState LOCAL lnReturn LOCAL lnAnswer with ThisForm *!* Make sure display rectangles are reset before *!* image aquisition. .oleLead.AutoSetRects = .T. *!* Select the TWAIN device and acquire the image. .oleLead.TwainSelect(.oleLead.hWnd) llLastState = .oleLead.EnableMethodErrors .oleLead.EnableMethodErrors = .F. lnReturn = .oleLead.TwainAcquire(.oleLead.hWnd) if lnReturn <> 0 lnAnswer = MessageBox("TWAIN device was not ready", 0, "Aquire") .oleLead.EnableMethodErrors = llLastState RETURN endif .oleLead.EnableMethodErrors = llLastState endwith