private void pictureBox5_Click(object sender, EventArgs e) { frmhome hm = new frmhome(); hm.Show(); }
private void button1_Click(object sender, EventArgs e) { if (textBox1.Text == "" || textBox2.Text == "") { textBox1.BackColor = Color.IndianRed; textBox2.BackColor = Color.IndianRed; } else { try { SqlConnection con = new SqlConnection("Data Source=BHUPEDRA-PC;Initial Catalog=Paytm;Integrated Security=True;Connect Timeout=15;Encrypt=False;TrustServerCertificate=False;ApplicationIntent=ReadWrite;MultiSubnetFailover=False"); con.Open(); SqlCommand cmd = new SqlCommand("select * from passbook where mo_no=" + textBox1.Text + "", con); SqlDataReader DR1 = cmd.ExecuteReader(); if (DR1.Read()) { label1.Text = DR1.GetValue(0).ToString(); label2.Text = DR1.GetValue(2).ToString(); label3.Text = DR1.GetValue(4).ToString(); label11.Text = DR1.GetValue(1).ToString(); } con.Close(); strname = label1.Text; NO_code = label11.Text; strbal = Convert.ToInt32(label3.Text); } catch { MessageBox.Show("invalid"); } if (textBox2.Text == label2.Text) { // Form1 f3 = new Form1(); // f3.Show(); //Form2 f2 = new Form2(); //f2.Show(); //frmaaa form1 = new frmaaa(); //form1.StartPosition = FormStartPosition.Manual; //form1.DesktopLocation = new Point(1000, 0); NotifyIcon notifyIcon = new NotifyIcon(); notifyIcon.Visible = true; // notifyIcon = new NotifyIcon(); notifyIcon.Icon = new Icon("paytm.ico"); // notifyIcon.Text = "Folder Monitor"; // notifyIcon.Visible = true; notifyIcon.BalloonTipTitle = "Paytm"; notifyIcon.BalloonTipText = "Successful Login \n wlc " + strname + ""; //notifyIcon.Icon = SystemIcons.Application; notifyIcon.ShowBalloonTip(30000); frmhome f2 = new frmhome(); f2.Show(); } else { MessageBox.Show("sorry"); } } }