Exemple #1
0
        //public Bitmap DrawToBitmap() {
        //    Bitmap ret = new Bitmap(this.Width,this.Height);
        //    Graphics gr = Graphics.FromImage(ret);
        //    this.Activate();
        //    gr.CopyFromScreen(this.Location,new Point(),this.Size);
        //    gr.Dispose();
        //    return ret;
        //}
        #endregion

        #region private helper
        private void InitializeComponent( )
        {
            this.SuspendLayout( );
            //
            // ILFigure
            //
            this.BackColor   = System.Drawing.Color.FromArgb((( int )((( byte )(244)))), (( int )((( byte )(244)))), (( int )((( byte )(244)))));
            this.ClientSize  = new System.Drawing.Size(476, 353);
            this.Name        = "ILFigure";
            this.Padding     = new System.Windows.Forms.Padding(3);
            this.FormClosed += new FormClosedEventHandler(ILFigure_FormClosed);
            this.Resize     += new System.EventHandler(this.ILFigure_Resize);
            this.Shown      += new System.EventHandler(this.ILFigure_ResizeEnd);
            this.ResizeEnd  += new System.EventHandler(this.ILFigure_ResizeEnd);
            this.ResumeLayout(false);
            m_figControl = new ILControl();
            Controls.Add(m_figControl);
        }
Exemple #2
0
 //public Bitmap DrawToBitmap() {
 //    Bitmap ret = new Bitmap(this.Width,this.Height); 
 //    Graphics gr = Graphics.FromImage(ret); 
 //    this.Activate(); 
 //    gr.CopyFromScreen(this.Location,new Point(),this.Size); 
 //    gr.Dispose(); 
 //    return ret; 
 //}
 #endregion
 
 #region private helper
 private void InitializeComponent ( ) {
     this.SuspendLayout ( );
     // 
     // ILFigure
     // 
     this.BackColor = System.Drawing.Color.FromArgb ( (( int ) ((( byte ) (244)))),(( int ) ((( byte ) (244)))),(( int ) ((( byte ) (244)))) );
     this.ClientSize = new System.Drawing.Size ( 476,353 );
     this.Name = "ILFigure";
     this.Padding = new System.Windows.Forms.Padding ( 3 );
     this.FormClosed += new FormClosedEventHandler(ILFigure_FormClosed);
     this.Resize += new System.EventHandler ( this.ILFigure_Resize );
     this.Shown += new System.EventHandler ( this.ILFigure_ResizeEnd );
     this.ResizeEnd += new System.EventHandler ( this.ILFigure_ResizeEnd );
     this.ResumeLayout ( false );
     m_figControl = new ILControl(); 
     Controls.Add(m_figControl); 
 }