Пример #1
0
        public void makeVisible(bool flag)
        {
            try
            {
                if (this.InvokeRequired)
                {
                    MakeVisibleDelegate d = new MakeVisibleDelegate(makeVisible);
                    this.Invoke(d, new object[] { flag });
                }
                else
                {
                    this.TopMost = flag;
                    this.Visible = flag;
                }

                if (flag)
                {
                    hk.HookStart();
                }
                else
                {
                    hk.HookStop();
                }
            }

            catch (Exception)
            {
            }
        }
Пример #2
0
        //Permite hacer visible la ventana del formulario desde un hilo diferente
        public void makeVisible(bool flag)
        {
            try
            {
                if (this.InvokeRequired)
                {
                    MakeVisibleDelegate d = new MakeVisibleDelegate(makeVisible);
                    this.Invoke(d, new object[] { flag });
                }
                else
                {
                    this.Visible = flag;
                    //lockTaskManager(flag);
                }

                if (flag)
                {
                    closeSessionMsg(true);
                    hk.HookStart();
                }
                else
                {
                    hk.HookStop();
                }

                TextBoxUser.Text                = "";
                TextBoxPass.Text                = "";
                LabelUsuario.Visible            = true;
                LabelContraseña.Visible         = true;
                TextBoxUser.Visible             = true;
                TextBoxPass.Visible             = true;
                BotonValidarUsuario.Visible     = true;
                LabelIngreseNombreYPass.Visible = true;
            }

            catch (Exception)
            {
            }
        }