Hello again,
I feel that it will be a tough question as I cannot reproduce this issue precisely in isolated application.
I have an issue with the control inherited from WebControl in complex MDI Winforms application.
Before I got to description - want to admit that in case I'm using original WebControl (not inherited) everything works fine, but I need a possibility to encapsulate an additional logic and hide it from other developers to keep API clean and simple.
Seems I'm loosing graphical context to web browser process whenever I'm trying to deattach MDI child form by doing something like this: m_childForm.MdiParent = null;
In small test application it work fine, but not in complex application that doing a lot things like OpenGL, etc.
However I manage to reproduce it partially and seems it is connected with window handle creation as it just enough to overload this method OnHandleCreated(EventArgs e) even with sequential call to base.OnHandleCreated(e); it giving approximately same behavior.
I'm managed to work around this by invoking WebView.Create(Handle) in OnHandleCreated by doing this:
Code: C#
protected override void OnHandleCreated(EventArgs e)
{
base.OnHandleCreated(e);
WebView.Create(Handle);
}
However this again not working in complex environment.
Link to test application source code:
https://drive.google.com/file/d/0B3gL2ztAuOYleUdDLUw3NVJUTU0/edit?usp=sharingHope you can advice something or give a possibility to reconnect graphical context on demand?
Thank you in advance,
Ruslan