Welcome Guest Search | Active Topics | Sign In | Register

Webbrowser in COM Enabled UserControl Options
swopt
Posted: Wednesday, September 2, 2015 6:38:17 AM
Rank: Newbie
Groups: Member

Joined: 8/14/2015
Posts: 2
Hi,

we are writing an C# UserControl which hosts an EO.Webbrowser Control.
When I add this UserControl to a Microsoft Access Form the content is rendered as expected.

But if I close Access and reopen it, the first time I open the form the content gets rendered, every time after that the form gets opened nothing is shown.

I tried to override the Dispose function like this:
Code: C#
protected override void Dispose(bool disposing)
        {

            this.webControl1.WebView = null;
            this.webView1 = null;
            this.webControl1 = null;
            this.Controls.Remove(this.webControl1);
            this.webView1.Dispose();
            this.webControl1.Dispose();
            if (disposing && (components != null))
            {
                components.Dispose();
            }
            base.Dispose(disposing);
        }


But nothing seems to work. I also tried to Refresh or Reload the page:

Code: C#
public void UserControlRefresh()
        {
            webControl1.Refresh();
        }

        public void UserControlReload()
        {
            webView1.Reload(true);
        }


But this doesnt work either. Still nothing is shown.

Any idea why this could be?
swopt
Posted: Wednesday, September 2, 2015 1:41:58 PM
Rank: Newbie
Groups: Member

Joined: 8/14/2015
Posts: 2
After some investigation I think I may have found the issue:

I tried to develop a workaround so that I would use a normal .NET Browser if the OS Version is 10, which is where I'm developing.

During the debug Session I found the following strange behavior.

Environment.OSVersion while debug from Visual Studio:

Code: C#
Environment.OSVersion
{Microsoft Windows NT 10.0.10240.0}
    Platform: Win32NT
    ServicePack: ""
    Version: {10.0.10240.0}
    VersionString: "Microsoft Windows NT 10.0.10240.0"

which is correct.

Environment.OSVersion while debug from Microsoft Access (Attached to Access Prozess):

Code: C#
Environment.OSVersion
{Microsoft Windows NT 6.2.9200.0}
    Platform: Win32NT
    ServicePack: ""
    Version: {6.2.9200.0}
    VersionString: "Microsoft Windows NT 6.2.9200.0"

which is completly wrong. Something seams to override the OSVersion.

Is it maybe a Bug in Windows 10 or Access?
Do you rely on Environment.OSVersion for some version checking internaly? Then this might be the issue.
eo_support
Posted: Friday, September 11, 2015 3:28:53 PM
Rank: Administration
Groups: Administration

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

I apolgoize for the delay. We have looked into this and we do not see any issues with Windows version. We do not rely on the reported OS version number.

If you have not tried the latest build, please try that first. We have fixed some issues related to domain unload, which maybe what Access is doing.

If the latest build still does not fix theproblem, please try to isolate the problem into a small test project and send the test project, along with necessary files/steps to reproduce the problem in Access to us. We do have an environment with Windows 10 and Access 2013. If you use other versions please let us know. We can check but we may not be able to get it.

Please see here for instructions on sending code to us:

http://www.essentialobjects.com/forum/test_project.aspx

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.