Quantcast
Channel: Windows Desktop Development for Accessibility and Automation forum
Viewing all articles
Browse latest Browse all 585

BUG uiAccess=true breaks WebBrowser control

$
0
0

BUG uiAccess=true breaks WebBrowser control

https://social.msdn.microsoft.com/Forums/en-US/bf7bf00c-a7be-40bb-b7cd-239bd5a80aa2/bug-uiaccesstrue-breaks-webbrowser-control?forum=windowsaccessibilityandautomation

Please help,

I have an application that uses a WebBrowser control in the main form. When I set uiAccess="true" in my manifest file, the WebBrowser control does not show, but does navigate. Interestingly, if I launch a modal dialog on the same form, the WebBrowser control shows.

No exceptions are thrown, or any output indicates any failure. Also, a tool like Fiddler, even show the HTTP traffic to the site there WebBrowser control navigates to, gets there with success.

I'm dead in the water without a solution to this.

To reproduce, to my knowledge.

1) Create a simple C#/WinForm app with the WebBrowser control, with the "this.TopMost = true" in the constructor.
2) Have the control navigate to something like www.microsoft.com.
3) Add a manifest to the app, but keep uiAccess = false.
4) Build your app, and install to Program Files (required for uiAccess = true in later steps).
5) Observe you app gets to www.microsoft.com and show the page in the WebBrowser control, and that a tool like Fiddler sees the http traffic to the site succeeds.
6) Open you manifest file, and set uiAccess = "true".
7) Rebuild, redploy to Program Files.
8) Observer, the WebBrowser control does not show.
9) Run something like Fiddler, and re-run the app, and observe that the site is successfully naviagted to, but the WebBrowser control is bnot shown.

EDIT, also, note while debugging your app, one will notice that the WebBroswer's "ReadyState" will be set to "Complete", in both steps (5) and (9), if you debug (via attach to process to the app in Program Files).

EDIT-2. I have missed a step, and added it to Step (1). The BUG only manifests itself when the form uses "TopMost = true" in the constructor along with uiAccess = "true".
And I confirmed, that any further reference to TopMost = true" with "uiAccess = "true" will likewise cause the WebBrowser control to NOT show, but it will still navigate.

EDIT-3 The "TopMost = true" can be set from the designer, and the BUG still manifests itself.

EDIT-4 - Work-Around. I have found that setting TopMost = true in the form's "_Load" handler after the WebBrowsewr control's first call to "Navigate", works. Anything from the desginer setting TopMost = true, to the constructor, or anything before the _Load" handler and first Novigate, BUG's out, and does not show the WebBrowser control if uiAccess = "true" in the manifest file.

This is a BUG, as setting TopMost = true in the designer, is a long standing standard practice.


Viewing all articles
Browse latest Browse all 585

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>