I have this code below for printing a report. How can I execute (cal) this
code from a menu button too?
// this is a routine for printing out the script.txt file
System.IO.StreamReader fileToPrint;
System.Drawing.Font printFont;
private void buttonLoad_Click(System.Object sender, System.EventArgs
e)
{
//get application path
string appPath;
appPath = System.Windows.Forms.Application.StartupPath.ToStr ing();
// print file
fileToPrint = new System.IO.StreamReader(appPath +
@"\Script.txt");
printFont = new System.Drawing.Font("Arial", 10);
printDocument1.Print();
fileToPrint.Close();
}