Beispiel #1
0
        private void SelectImage_Click(object sender, EventArgs e)
        {
            try
            {
                WindowState = FormWindowState.Minimized;
                System.Threading.Thread.Sleep(200);

                image = UiFactory.Instance.NewUiImage();
                uiNode.FromScreenRegion(image.SelectInteractive());

                SelectorTextBox.Text = uiNode.GetSelector(true);
                //show image on form
                Bitmap pic = System.Drawing.Image.FromHbitmap((IntPtr)image.hBitmap);
                picture.Image   = (Image)pic;
                picture.Visible = true;
                WindowState     = FormWindowState.Normal;
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }