Monday, 27 May 2013

C# Basic Knowledge Of Masked Text Box



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

namespace maskedtextbox
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
            this.MaximizeBox = false;
            this.MinimizeBox = false;
        }

        private void button1_Click(object sender, EventArgs e)
        {
            label1.Visible = true;
            try
            {

                if (maskedTextBox1.Text != "") { label1.Text = maskedTextBox1.Text; }
            }
            catch (Exception ie)
            {
                MessageBox.Show(Convert.ToString(ie));
            }
        }

        private void button2_Click(object sender, EventArgs e)
        {
            this.Close();
        }

        private void linkLabel1_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
        {
            MessageBox.Show("Contact me at twitter: @umarjavedmalik", "Contact us",MessageBoxButtons.OK,MessageBoxIcon.Question);
        }
    }
}
//output then you will be display interface to enter values
//Output by clicking the button ok you will be showed as under then u click help button u will be showed messagebox



No comments:

Post a Comment