Answered by:
First Chance Exception: WebBrowser Control

Question
-
See the code in this thread .
There are VB and C# versions of a demo Web Browser Control and a Progress Bar.
However, the VS Output Window shows the following whenever it navigates to a URL.
A first chance exception of type 'System.ArgumentOutOfRangeException' occurred in System.Windows.Forms.dll
But, execution does not break for it.
The following does not even catch it.
static class Program
{
/// <summary>
/// The main entry point for the application.
/// </summary>
[STAThread]
static void Main()
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
try
{
Application.Run(new WebBrowser());
}
catch
{
}
}
}
How would I trace this down?
Thanks ahead of time.
Rudy =8^D
Mark the best replies as answers. "Fooling computers since 1971."Wednesday, August 19, 2009 2:24 PM
Answers
-
First chance exception is usually safe to ignore. Here, it means that a Windows.Forms internal method did something that threw an exception but it was gracefully caught and handled.
http://blog.voidnish.com- Marked as answer by Rudedog2 Wednesday, August 19, 2009 2:31 PM
Wednesday, August 19, 2009 2:30 PM
All replies
-
First chance exception is usually safe to ignore. Here, it means that a Windows.Forms internal method did something that threw an exception but it was gracefully caught and handled.
http://blog.voidnish.com- Marked as answer by Rudedog2 Wednesday, August 19, 2009 2:31 PM
Wednesday, August 19, 2009 2:30 PM -
Thanks.
I've seen these before with other types of messages in the Forms.dll but have never tried to track them down.
I'll let a sleeping dog rest.
Mark the best replies as answers. "Fooling computers since 1971."Wednesday, August 19, 2009 2:33 PM -
Thanks.
I've seen these before with other types of messages in the Forms.dll but have never tried to track them down.
I'll let a sleeping dog rest.
Mark the best replies as answers. "Fooling computers since 1971."
You can do a little bit of tracking down if you want to. Just use the Debug/Exceptions dialog and tell the debugger to break on any thrown ArgumentOutOfRangeException. And when the debugger breaks, use the call stack to figure out what WinForms method threw - and then use Reflector to go look at that method. That'll give you a fairly decent idea of what has happened to cause the exception.
http://blog.voidnish.comWednesday, August 19, 2009 2:36 PM