Ejemplo n.º 1
0
        /// <summary>
        /// Required method for Designer support - do not modify
        /// the contents of this method with the code editor.
        /// </summary>
        private void InitializeComponent()
        {
            this.SuspendLayout();
            this.KeyPreview      = true;
            this.Text            = ";3 Image Viewer";
            this.StartPosition   = FormStartPosition.Manual;
            this.WindowState     = FormWindowState.Normal;
            this.FormBorderStyle = FormBorderStyle.None;
            this.Bounds          = ScreenHelper.GetActiveScreenBounds();
            this.TopMost         = true;
            this.BackColor       = Color.Black;


            ivMain      = new ImageDisplay();
            ivMain.Dock = DockStyle.Fill;

            ivMain.DisposeImageOnReplace = false;

            this.Controls.Add(ivMain);

            this.KeyDown += ImageViewerForm_KeyDown;
            this.BringToFront();
            this.Activate();
            this.ResumeLayout();
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Captures the active monitor.
        /// </summary>
        /// <returns>A <see cref="Bitmap"/> of the active monitor.</returns>
        public static Bitmap CaptureActiveMonitor()
        {
            Rectangle bounds = ScreenHelper.GetActiveScreenBounds();

            return(CaptureRectangle(bounds));
        }