in

Data Techniques Forums

TwainGUI: LoadOptions

Last post 10-02-2008 8:28 AM by EvgenBA. 0 replies.
Page 1 of 1 (1 items)
Sort Posts: Previous Next
  • 10-02-2008 8:28 AM

    TwainGUI: LoadOptions

    Hello!

    I can't load options into the TwainGui (they doesn't relects) ... why?

    ------------------------------------------------------------

    Code sample: 

            private void menuItem2_Click(object sender, EventArgs e)
            {
                try
                {
                    // call open-find-dialog
                    if (ofd.ShowDialog(this) != System.Windows.Forms.DialogResult.OK)
                    {
                        return;
                    }

                    using (TwainGui gui = new TwainGui())
                    {
                        gui.LoadOptions(ofd.FileName);
                       
                        gui.Twain.ShowIndicators = false;
                        gui.Twain.UserInterface = DTI.ImageMan.Twain.UserInterfaces.None;

                        gui.Twain.ScanComplete += ScanCompleted;

                        PictureBox1.Image = gui.Twain.ScanPage();
                       
                        PictureBox1.Width = PictureBox1.Image.Width;
                        PictureBox1.Height = PictureBox1.Image.Height;
                        PictureBox1.Refresh();

                        //gui.Twain.CloseSource();

                    }



                }
                catch (Exception ee)
                {
                    MessageBox.Show(ee.Message);
                }


            }

            private void ScanCompleted(object sender, EventArgs e)
            {
                MessageBox.Show("Scan complete!");
            }
     

    ------------------------------------------------------------ 

    It is strange, but I don't see the message  "Scan complete!" after acquiring.

     

    Thanks,  Evgen

    Filed under: ,
Page 1 of 1 (1 items)
Copyright 2009 Data Techniques, Inc. All Rights Reserved.