Reputation: 1971
My MessageBox.Show() function works well when I started to double click myApp.exe. But When I tried to attached the Application process with source code. and set breakpoint At the code below, It doesn't work. What I mean is the MessageBox didn't pop-up. And the code catched by another outer exception handling. Does it caused by multi-threading timing issue?
I don't know why? Thanks.
if (File.Exists(myConfigFile))
{
doc.Load(myConfigFile);
}
else
{
MessageBox.Show("Read " + myConfigFile + " failed, can't find the file",
"Critical Warning",
MessageBoxButtons.OK,
MessageBoxIcon.Error);
}
Upvotes: 2
Views: 2102
Reputation: 43523
MessageBox.Show
can't be used in a web application. You can use javascript
in your pages like alert(123)
.
Upvotes: 1
Reputation: 16162
I think that your source code has some differentiation from the attached process. you should rebuild your solution first, then start your newly created application exe from the solution folder "either at bin\debug or bin\release" depending on your build target, and then attach application process with source code.
Upvotes: 1