private void AcquireBuffered_Click(object sender, EventArgs e)
        {
            if (SelectedSource != 0)
            {
                TwainAPI.DTWAIN_SetBlankPageDetection(SelectedSource, 98.5,
                                                      (int)TwainAPI.DTWAIN_BP_AUTODISCARD_ANY,
                                                      DiscardBlankPages.Checked ? 1 : 0);

                DTWAIN_ARRAY acquireArray = TwainAPI.DTWAIN_CreateAcquisitionArray();
                this.Enabled = false;
                int status = 0;
                if (TwainAPI.DTWAIN_AcquireBufferedEx(SelectedSource, TwainAPI.DTWAIN_PT_DEFAULT,
                                                      TwainAPI.DTWAIN_ACQUIREALL, UseSourceUI.Checked ? 1 : 0, 0, acquireArray, ref status) == 0)
                {
                    MessageBox.Show("Acquisition Failed", "TWAIN Error");
                    return;
                }

                if (TwainAPI.DTWAIN_ArrayGetCount(acquireArray) == 0)
                {
                    MessageBox.Show("No Images Acquired", "");
                    return;
                }

                // Display the DIBS
                //...
                DIBDisplayerDlg sDIBDlg = new DIBDisplayerDlg(acquireArray);
                sDIBDlg.ShowDialog();
                TwainAPI.DTWAIN_DestroyAcquisitionArray(acquireArray, 0);
                this.Enabled = true;
            }
        }