Hi all,
I have a winform project, and I would like to call the application, and have it exit when the code has executed. Somehow Application.Exit does not work for me. Here is my code
public void Print()
{
object empty = null;
axW.Navigate("http://localhost:2124/Studiebogservice/_Ankomst/LabelPrint.aspx?id=" + "20201", ref empty, ref empty, ref empty, ref empty);
for (; axW.ReadyState != SHDocVw.tagREADYSTATE.READYSTATE_COMPLETE; )
{
System.Windows.Forms.Application.DoEvents();
}
axW.ExecWB(SHDocVw.OLECMDID.OLECMDID_PRINT, SHDocVw.OLECMDEXECOPT.OLECMDEXECOPT_DONTPROMPTUSER, ref empty, ref empty);
Application.Exit();
}
Exit application
1 Answer
Know the answer? Post it. Somebody with the same question will find it here.

VulpesRank #55 · 29.2K reputationPosted Nov 12, 2012, 12:22 AM EST