0

I get Above Error when try to open a report.

private void btnLoadCustRemitt_Click(object sender, RoutedEventArgs e)
{
    try
    {

        CustomerRemittReportWin cusRemRep = new CustomerRemittReportWin();
        cusRemRep.Show();
    }
    catch (Exception ex)
    { this.MyErrorMessage(ex);

    MessageBox.Show("This Part Executed");
    }

}

enter image description here

when pressed on load this message appears, and after that my message shows as for surety i did put messageBox that i am on right code.

On VS 2012 it was working perfectly fine. but now as i moved to VS 2013, windows 10, i am getting this issue??

=-=-=-=--=-=

There is a simplar problem already posted, but i am not sure how to fix my problem with that solution..

https://stackoverflow.com/questions/23452864/wpf-dispatcher-processing-has-been-suspended-but-messages-are-still-being-pro#=

Community
  • 1
  • 1
Sizzling Code
  • 5,932
  • 18
  • 81
  • 138

2 Answers2

1

Uninstalled VS 2013 and tried reinstall VS 2013 different version but same problem..

So i finally uninstalled VS 2013 again and installed the VS2012 in which this software was actually built.

magically now there are no errors in VS 2012, even thou i am using windows 10 preview version..

I don't know what up with Microsoft new version of Visual studios not supporting old visual studio developed programs.. :(

Sizzling Code
  • 5,932
  • 18
  • 81
  • 138
0

I think you might need to wrap the UI relevant code in Dispatcher.BeginInvoke call to defer the UI operations for when the Dispatcher resumes processing.

private void btnLoadCustRemitt_Click(object sender, RoutedEventArgs e)
{
    try
    {
        Dispatcher.BeginInvoke(new Action(() => 
        {
            CustomerRemittReportWin cusRemRep = new CustomerRemittReportWin();
            cusRemRep.Show();
        };
    }
    catch (Exception ex)
    { this.MyErrorMessage(ex);

    MessageBox.Show("This Part Executed");
    }
}

I haven't tested this...

Glen Thomas
  • 10,190
  • 5
  • 33
  • 65