Yooyo is correct, it means that an unhandled exception is being thrown in the Paint event. It has nothing explicit to do with OpenGL.
The OP didn’t mention which managed .net language (C#, C++, VB, etc.), or what type of control you are using (UserControl, Control, Panel, Picture, etc.).
Normally you should not have any exceptions occurring in the paint event unless there is a serious code design issue.
If you have to place any try/catch blocks then chances are something is wrong with the code design itself, in other words there is some code in the paint event that shouldn’t be there.
Normally the control will have OnPaintBackground overridden to prevent background painting, and Styles set for all painting in wmpaint.
Do not attempt any GDI drawing to the client (GetDC) or window (GetWindowDC) hDC or you will have issues on composited interfaces (Vista and W7).
Be sure to keep track of the control’s hDC and the hRC until you properly destroy the control and release all resources.
The Paint/OnPaint event handler should have a fail-safe check that tests whether the RC is valid (from the initial create rc call) and performs a GDI FillRectangle on the control client rectangle if the RC is not valid.
All GDI objects (brushes, pens, etc.) should always be correctly disposed, do not rely on the GC to handle this. If you are using C# then be sure to bracket them in a using() statement whenever possible. Do not maintain global GDI objects, always create and dispose in the paint handler.
On a final note, sorry I must disagree with Yooyo regarding using .net for application or OpenGL development. Managed .net works fine, it just requires some different programming tactics than Win32 and a good understanding of how .net works. My company is developing a retail application using OpenGL in .net and we are getting performance that is comparable to Win32 C++, but we are using a lot of specific programming techniques to achieve this. The application has over a dozen custom developed user interface controls including ‘subclassed’ .net controls without running into any ‘bugs’. However, each person may encounter their own specific problems depending on what they are developing.