Пример #1
0
 void ReturnFocusToInput( TextBox txt )
 {
     if ( ! this.InvokeRequired )
     {
         txt.Clear();
         txt.Focus();
     }
     else
     {
         ReturnFocus rf = new ReturnFocus( ReturnFocusToInput );
         this.Invoke( rf, new object[] { txt } );
     }
 }
Пример #2
0
 void ReturnFocusToControl( Control ctrl )
 {
     if ( !this.InvokeRequired )
     {
         ctrl.Focus();
     }
     else
     {
         ReturnFocus rf = new ReturnFocus( ReturnFocusToControl );
         this.Invoke( rf, new object[] { ctrl } );
     }
 }
Пример #3
0
        void MovedControls( TextBox txt )
        {
            if ( ! this.InvokeRequired )
            {
                this.panelInputPassword2.Visible = false;
                this.metroLabel2.Visible = false;
                this.tgRemenber2.Visible = false;

                this.ptbImagePorfile.Location = new Point( 129, 60 );
                this.lblFullName.Location = new Point( 50, 211 );
                this.lblCargo.Location = new Point( 6, 239 );
                this.btnContinuar.Location = new Point( 145, 310 );
                this.btnCambiar.Location = new Point( 72, 310 );
            }
            else
            {
                ReturnFocus rf = new ReturnFocus( MovedControls );
                this.Invoke( rf, new object[] { txt } );
            }
        }