Welcome Guest Search | Active Topics | Sign In | Register

EO.WebBrowser in complex MDI WinForms enviroment Options
Ruslan
Posted: Thursday, April 10, 2014 5:11:40 AM
Rank: Newbie
Groups: Member

Joined: 3/30/2014
Posts: 5
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=sharing

Hope you can advice something or give a possibility to reconnect graphical context on demand?

Thank you in advance,
Ruslan
eo_support
Posted: Thursday, April 10, 2014 9:16:09 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,196
Thanks for the detailed information. Can you elaborate what you mean by "loosing graphical context"?
Ruslan
Posted: Thursday, April 10, 2014 10:37:08 AM
Rank: Newbie
Groups: Member

Joined: 3/30/2014
Posts: 5
eo_support wrote:
Thanks for the detailed information. Can you elaborate what you mean by "loosing graphical context"?

Instead of web page I see an empty square, and if I put any window on top and move it keeps "remaining's" of that windows.
The test application replicate this behavior but I'm not sure about root cause.
eo_support
Posted: Thursday, April 10, 2014 10:38:41 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,196
I see. We will look into this and let you know as soon as we find anything.

Thanks!
Ruslan
Posted: Monday, April 14, 2014 12:31:33 PM
Rank: Newbie
Groups: Member

Joined: 3/30/2014
Posts: 5
Hello again,

I managed to localize this issue, it is not connected with inheritance or so.
In my big application I had a page with javascript that doing network polling every 100ms and custom resource handler which is responsible for processing that request and whenever you try to undock MDI child (by changing form MdiParent) it leading to described above behavior.

I workaround that by disabling poll while undock and if you curious I can submit small application that reproduces this problem.
Please let me know.

Cheers,
Ruslan
eo_support
Posted: Monday, April 14, 2014 1:16:42 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,196
Hi,

Thank you very much for the feedback. Yes. We would be very curious to see the problem. It will be great if you can send us a test app. We will PM you as to where to send it.

Thanks!


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.