When you cancel the status window when printing to a file, the status window
hangs and cannot be closed ---you must go to the task manager to End the
window session in order to close the window. This is a demonstrable problem
in Net Framework 1.1 by using the code below. I could not find any solution
to this problem in Knowledge Base.

****
StringReader streamToPrint = new StringReader (textArea.Text);

//Assumes the default printer
TextPrintDocument pd = new TextPrintDocument(streamToPrint,textArea.Font);

if (storedPageSettings != null)
{
pd.DefaultPageSettings = storedPageSettings ;
}

PrintDialog dlg = new PrintDialog() ;
dlg.Document = pd;
DialogResult result = dlg.ShowDialog();

try
{
if (result == DialogResult.OK)
{
pd.Print();
}
}
catch( Exception ex )
{
Console.WriteLine(ex);
dlg.Dispose();
}