Practical 2 - A
Form1.cs
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | 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 Prac21 { public partial class Form1 : Form { public Form1() { InitializeComponent(); } private void button1_Click(object sender, EventArgs e) { MessageBox.Show("HI This is Gajjar"); } } } |
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;
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 Prac21
{
public partial class Form2 : Form
{
public Form2()
{
InitializeComponent();
}
{
public partial class Form2 : Form
{
public Form2()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
MessageBox.Show("Hi, " + textBox1.Text);
}
}
}
{
MessageBox.Show("Hi, " + textBox1.Text);
}
}
}
Form3.cs
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;
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 Prac21
{
public partial class Form3 : Form
{
public Form3()
{
InitializeComponent();
}
{
public partial class Form3 : Form
{
public Form3()
{
InitializeComponent();
}
private void btndisplay_Click(object sender, EventArgs e)
{
if (txtname.Text.Equals("") || txtcity.Text.Equals(""))
{
MessageBox.Show("Plz Enter All Details");
}
else {
lblname.Text = txtname.Text;
lblcity.Text = txtcity.Text;
}
}
{
if (txtname.Text.Equals("") || txtcity.Text.Equals(""))
{
MessageBox.Show("Plz Enter All Details");
}
else {
lblname.Text = txtname.Text;
lblcity.Text = txtcity.Text;
}
}
private void btnclear_Click(object sender, EventArgs e)
{
lblcity.Text = "";
lblname.Text = "";
txtcity.Text = "";
txtname.Text = "";
}
{
lblcity.Text = "";
lblname.Text = "";
txtcity.Text = "";
txtname.Text = "";
}
private void btnclose_Click(object sender, EventArgs e)
{
Application.Exit();
}
}
}
{
Application.Exit();
}
}
}
No comments:
Post a Comment