Professional Documents
Culture Documents
Visual Studio LAB Manual Lec02
Visual Studio LAB Manual Lec02
LAB [02]
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace Lec02
{
public partial class frmLogin : Form
{
public frmLogin()
{
InitializeComponent();
}
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace Lec02
{
public partial class SecondForm : Form
{
public SecondForm()
{
InitializeComponent();
}
private void btnAddName_Click(object sender, EventArgs e)
{
string strName;
strName = txtName.Text;
if (strName == "")
{
MessageBox.Show("Please Enter Name..... ");
}
else
{
listBox1.Items.Add(strName);
}
txtName.Clear();
txtName.Focus();
}
}
}