NUML UNIVERSITY LAB # 01 SUBJECT: Visual Programming Submitted by: Shumaim Saleem ( FC-013 ) Submitted To: Sir Zubair Afzal Topic: Designing Windows Form, Calling Events, Changing Properties, Passing Data between Forms, Prompt Messages on Events Screenshots: Code Form1: 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 Lab1 { public partial class Form1 : Form { public Form1() { InitializeComponent(); } private void button1_Click(object sender, EventArgs e) { bool C1 = checkBox1.Checked; Form2 form2 = new Form2(); form2.fName= fName.Text; form2.lName=Lname.Text; form2.email=Eaddress.Text; form2.chkSMS= checkBox1.Checked; form2.chkMonthly= checkBox2.Checked; form2.chkTransaction= checkBox3.Checked; this.Hide(); form2.Show(); } } } Code Form2: 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 Lab1 { public partial class Form2 : Form { public String fName; public String lName; public String email; public bool chkSMS; public bool chkMonthly; public bool chkTransaction; public Form2() { InitializeComponent(); } private void Form2_Load(object sender, EventArgs e) { this.label4.Text = fName; this.label5.Text = lName; this.label6.Text = email; this.label13.Text = chkSMS.ToString(); this.label14.Text = chkMonthly.ToString(); this.label15.Text = chkTransaction.ToString(); } } }