To exit application
-
private void button1_Click(object sender, EventArgs e) { conn.Open(); System.Windows.Forms.Form login_ = new login(); login_.Show(); if (login_.Close()) { Application.Exit(); } conn.Close(); } i m opening this form 'Login' on button click n then if i close this form by clicking on close button, application itself must also stop running automatically. As even if i close all forms the application keeps on running till i stop it myself. Plz help on it. Thank You. -- modified at 1:13 Monday 19th February, 2007
first remove this If (login_.Close()) Then { Application.Exit(); } one prob solve.
-
first remove this If (login_.Close()) Then { Application.Exit(); } one prob solve.
but after i logout, this login form is shown again, now if i close this login form from close button, application must also end automatically,which is not ending till i stop it myself. how to do it? AND i want to access 'url' of current datetime. "select url from tblsummary where accessdate = " + DateTime.Now; this is giving error. thanx. nekshan.
-
but after i logout, this login form is shown again, now if i close this login form from close button, application must also end automatically,which is not ending till i stop it myself. how to do it? AND i want to access 'url' of current datetime. "select url from tblsummary where accessdate = " + DateTime.Now; this is giving error. thanx. nekshan.
"select url from tblsummary where accessdate = '" + DateTime.Now + "'" now work.
-
private void button1_Click(object sender, EventArgs e) { conn.Open(); System.Windows.Forms.Form login_ = new login(); login_.Show(); if (login_.Close()) { Application.Exit(); } conn.Close(); } i m opening this form 'Login' on button click n then if i close this form by clicking on close button, application itself must also stop running automatically. As even if i close all forms the application keeps on running till i stop it myself. Plz help on it. Thank You. -- modified at 1:13 Monday 19th February, 2007
lunch time. bye..after 1 hr.
-
private void button1_Click(object sender, EventArgs e) { conn.Open(); System.Windows.Forms.Form login_ = new login(); login_.Show(); if (login_.Close()) { Application.Exit(); } conn.Close(); } i m opening this form 'Login' on button click n then if i close this form by clicking on close button, application itself must also stop running automatically. As even if i close all forms the application keeps on running till i stop it myself. Plz help on it. Thank You. -- modified at 1:13 Monday 19th February, 2007
if u want to close application on close button then write this code on close button click Application.Exit();
-
private void button1_Click(object sender, EventArgs e) { conn.Open(); System.Windows.Forms.Form login_ = new login(); login_.Show(); if (login_.Close()) { Application.Exit(); } conn.Close(); } i m opening this form 'Login' on button click n then if i close this form by clicking on close button, application itself must also stop running automatically. As even if i close all forms the application keeps on running till i stop it myself. Plz help on it. Thank You. -- modified at 1:13 Monday 19th February, 2007
write above reply mail on close button of login page. and replay me
-
write above reply mail on close button of login page. and replay me
-
write above reply mail on close button of login page. and replay me
-
Arey, 'close' is not my button, it is the form close button on top right side with minimize n restore buttons.
Private Sub formName_FormClosing(ByVal sender As Object, ByVal e As System.Windows.Forms.FormClosingEventArgs) Handles Me.FormClosing Application.Exit(); End Sub this is the even of form this is called at the time of form closing. ok and formName is the name of form.
-
Private Sub formName_FormClosing(ByVal sender As Object, ByVal e As System.Windows.Forms.FormClosingEventArgs) Handles Me.FormClosing Application.Exit(); End Sub this is the even of form this is called at the time of form closing. ok and formName is the name of form.