예제 #1
0
        public NuGenScreenCap()
        {
            InitializeComponent();
            p = new Pen(Color.Black);
            p2 = new Pen(Color.White);
            p.DashCap = p2.DashCap = DashCap.Flat;
            p.DashStyle = p2.DashStyle = DashStyle.Custom;
            p.DashPattern = p2.DashPattern = new float[] { 4, 4 };
            Color c = Color.Blue;
            c = Color.FromArgb(20, c.R, c.G, c.B);
            b = new SolidBrush(c);
            coordsBrush = new SolidBrush(coordsColor);
            this.redrawTimer.Start();
            //Get the initial screen shot
            ScreenCapture sc = new ScreenCapture();
            Bitmap img = sc.CaptureScreen();

            if (this.Bitmap != null)
                this.Bitmap.Dispose();
            this.Bitmap = img;

            if (autoSizeParentForm)
                SetupParentForm();
            this.saveFileDialog.Filter = "Bitmap Files|*.bmp|JPEG Files|*.jpeg|PNG Files|*.png|GIF Files|*.gif|TIFF Files|*.tiff|Icon Files|*.ico";
        }
예제 #2
0
        public void CaptureScreen()
        {
            ScreenCapture sc = new ScreenCapture();
            Bitmap img = sc.CaptureScreen();

            if (this.Bitmap != null)
                this.Bitmap.Dispose();
            this.Bitmap = img;
        }
예제 #3
0
        private void NuGenScreenCap_Load(object sender, EventArgs e)
        {            
            //Get the initial screen shot
            ScreenCapture sc = new ScreenCapture();
            Bitmap img = sc.CaptureScreen();

            if (this.Bitmap != null)
                this.Bitmap.Dispose();

            this.Bitmap = img;

            if( autoSizeParentForm )
                SetupParentForm();
        }