my code stock.com

This is a test.

Snippet options

Download: Download snippet as test.c.
Copy snippet: For this you need a free my code stock.com account.
Embed code : You will find the embed code for this snippet at the end of the page, if you want to embed it into a website or a blog!

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace _04_05_2011_Aplicacion_1
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void BtnLogin_Click(object sender, EventArgs e)
        {
            if (TxtUser.Text == "keplerk" && TxtPassword.Text == "r7rru9qo")
            {
                LblUser.Visible = false;
                LblPassword.Visible = false;
                BtnLogin.Visible = false;
                BtnReset.Visible = false;
                BtnReturn.Visible = true;
                LblLogued.Visible = true;
                TxtUser.Visible = false;
                TxtPassword.Visible = false;
            }
            else
                MessageBox.Show("Error datos incorrectos");
        }

        private void BtnReturn_Click(object sender, EventArgs e)
        {
            LblUser.Visible = true;
            LblPassword.Visible = true;
            BtnLogin.Visible = true;
            BtnReset.Visible = true;
            BtnReturn.Visible = false;
            LblLogued.Visible = false;
            TxtUser.Visible = true;
            TxtPassword.Visible = true;

        }

        private void BtnReset_Click(object sender, EventArgs e)
        {
            TxtUser.Text = "";
            TxtPassword.Text = "";

        }
    }
}

Create a free my code stock.com account now.

my code stok.com is a free service, which allows you to save and manage code snippes of any kind and programming language. We provide many advantages for your daily work with code-snippets, also for your teamwork. Give it a try!

Find out more and register now

You can customize the height of iFrame-Codes as needed! You can find more infos in our API Reference for iframe Embeds.