How to Create Information form in Visual Studio-- Windows Forms Application c#

How to Create information form  in Visual Studio c#


Student Registration System in c#.net :)(Windows Forms Application)
hi guys here we go again, i just want to share this simple system. hope this help.





C# Code..........


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 student information Form
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

       
        private void Form1_Load(object sender, EventArgs e)
        {

            for (int i = 1; i <= 31; i++)
            {
                cmbday.Items.Add(i);
            }
            for (int i = 1; i <= 12; i++)
            {

                DateTime dt = new DateTime(2015, i, 1);
                cmbmonth.Items.Add(dt.ToString("MMMM"));
            }

            for (int i = 1990; i < 2020; i++)
            {
                cmbyear.Items.Add(i);
            }
            cmbday.SelectedIndex = 0;
            cmbmonth.SelectedIndex = 0;
            cmbyear.SelectedIndex = cmbyear.Items.Count - 1;

            for (int i = 1; i <= 31; i++)
            {
                cmbday1.Items.Add(i);
            }
            for (int i = 1; i <= 12; i++)
            {

                DateTime dt = new DateTime(2015, i, 1);
                cmbmonth2.Items.Add(dt.ToString("MMMM"));
            }

            for (int i = 1990; i < 2020; i++)
            {
                cmbyear3.Items.Add(i);
            }
            cmbday.SelectedIndex = 0;
            cmbmonth.SelectedIndex = 0;
            cmbyear.SelectedIndex = cmbyear.Items.Count - 1;

            }

        private void textBox1_KeyPress(object sender, KeyPressEventArgs e)
            {
            int asc = (int)e.KeyChar;
            if (char.IsDigit(e.KeyChar) == false && asc != 8)

            {

                e.Handled = true;
            }
            }

        private void textBox1_MouseEnter(object sender, EventArgs e)
           {
            TextBox t = (TextBox)sender;
            t.Font = new Font("surendra", 20f);
           }

        private void textBox1_MouseLeave(object sender, EventArgs e)
         {
               TextBox t = (TextBox)sender;
            t.Font = new Font("surendra", 8.25f);
        
         }
   
        private void button1_Click(object sender, EventArgs e)
        {
            string gender;
            if (radioButton1.Checked == true)
                gender = "male";
            else
                gender = "female";
            MessageBox.Show("STUDENT NO:" + textBox1.Text + "\n" + "STUDENT NAME:" + textBox2.Text + "\n" + "FATHER NAME:" + textBox3.Text + "\n" + "DATE OF BIRTH:" + cmbday.SelectedItem.ToString() + "/" + cmbmonth.SelectedItem.ToString() + "/" + cmbyear.SelectedItem.ToString() + "\n" + "SSC NO:" + textBox4.Text + "\n" + "ADMITION NO:" + textBox5.Text + "\n" + "COURSE:" + "COURSE:" + comboBox1.Text + "\n" + "COLLAGE NAME:" + comboBox2.Text + "\n" + "course year:" + comboBox3.Text + "\n" + "ADMITION DATE:" + cmbday1.SelectedItem.ToString() + "/" + cmbmonth2.SelectedItem.ToString() + "/" + cmbyear3.SelectedItem.ToString() + "\n" + "gender:" + gender);
           MessageBox.Show("THANKS FOR USEING THIS SOFTWARE");
        }



    }


}



Comments