Exemplo n.º 1
0
        protected override void OnLoad(EventArgs e)
        {
            base.OnLoad(e);
            if (SpecificWindowMode)
            {
                this.Size = BackgroundImage.Size;
                mhook     = new MouseListener();

                mhook.Click += (sender, loc) => {
                    if (loc.X > Location.X && loc.X < Location.X + Size.Width && loc.Y > Location.Y && loc.Y < Location.Y + Size.Height)
                    {
                        return;
                    }
                    DialogResult = DialogResult.Abort;
                    SystemSounds.Beep.Play();

                    this.Close();
                    mhook.Stop();
                };
                mhook.Start();



                return;
            }
            //full screen mode:
            MultiScreenSize m_MultiScreenSize = FindMultiScreenSize();

            this.Size = new Size(m_MultiScreenSize.maxRight - m_MultiScreenSize.minX, m_MultiScreenSize.maxBottom - m_MultiScreenSize.minY);

            Graph.CopyFromScreen(m_MultiScreenSize.minX, m_MultiScreenSize.minY, 0, 0, BitmapSize);
        }
Exemplo n.º 2
0
 public void StopPicking()
 {
     MouseListener.MouseDownExt -= _pick;
     MouseListener.Stop();
 }