We have many users of the internal application scattered across the country.
One user had been running the application on an Old Win 7 machine, and now he has it installed on his new Win 10 machine.
As soon as he started using the application on the new machine, he started getting errors.
Here is the affected code in the PrintStackHeaderSheets method:
string outFile = "StackHeaderSheets.tif";
try
{
for (int i = 0; i < sheets; i++)
{
int which = initial + i;
string Which = (which).ToString("D4");
string SHD = SH + "-" + Which;
shformvalues.Heading = SHD;
Bitmap bmp = DrawSH();
string fn = "File_" + i.ToString("D3") + ".bmp";
string FQFN = Path.Combine(DataPath, fn);
bmp.Save(FQFN);
}
CreateMultiPageTiff(outFile);
}
catch (Exception ex)
{
string tr = TraceTrim(ex);
wr(tr);
MessageBox.Show(tr);
return;
}
string msg = CreateAndLauchBatFileToPrint(outFile, PrinterName);
istatus.Show("Printing... " + msg);
}
This section throws an exception (only on the new computer), which is recorded in the application's log file by the wr(tr) call:
19:12:55 Line:109 file:AppLogic.Print.cs Method:Void PrintStackHeaderSheets(System.Object)
A generic error occurred in GDI+.
Line 109 is the bmp.Save(FQFN); statement. This seems an odd place to throw a graphics error. Is this possible? What would cause this?
The computer and the user are about 1000 miles from my location, so I cannot directly troubleshoot.