I'm writing a Windows Forms application using .NET Framework 4, it runs perfectly on Windows 7 and 8, but when I want to show a saveFileDialog in Windows XP the application closes after 3 to 6 seconds of showing the dialog window, I tested the application in two different machines with Windows XP and I get different errors on each one!!, so looking in the Windows event log I can see the message errors:
In the first machine the error shown is: "Faulting module clr.dll", so in this case I overwrote the .dll file from another Windows XP but the error persists.
In the second machine the error shown is: "The process was terminated due to stack overflow", I'm not using recursion in my application, just showing the dialog.
I'm using a try-catch in this line of code but it doesn't work, the application just closes
So does anybody has a clue about this??, this is the code of my event handler
private void btnExaminar_Click(object sender, EventArgs e)
{
try
{
if (saveFileDialog.ShowDialog() == DialogResult.OK)
{
txtExaminar.Text = saveFileDialog.FileName;
}
}
catch (Exception ex)
{
MessageBox.Show(ex.Message);
}
}