Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Webbrowser edit works in XP but not in Windows 7 ??

Posted on 2011-09-16
4
Medium Priority
?
448 Views
Last Modified: 2013-12-17
Hi Guys,

Another one of those Win 7 breaking changes, I guess, like the Print dialog thing and the progress bar issue...

I have an HTML text box based on a web browser control which I use in an email dialog amongst other things, and it works perfectly under XP regardless of how it is used.  However, under Windows 7 it does not accept the cursor and ignores any keypresses.

Can anyone suggest a cause and resolution for this?  

Chris Bray
0
Comment
Question by:chrisbray
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
4 Comments
 
LVL 4

Accepted Solution

by:
guramrit earned 2000 total points
ID: 36553992
This is not because of Windows 7, Its because of IE9 on some systems, if you uninstall IE9 on win7 then you'll see your solution working. For reference, see http://www.codeproject.com/Questions/235977/IE9-disabled-the-Web-Browser-control
0
 
LVL 3

Author Comment

by:chrisbray
ID: 36554011
Hi guramrit:

Thank you for your response - it is certainly useful to know what is causing the issue.  However, even if their system permits asking all my customers to uninstall IE9 is not an option....

Can you suggest how to get around the problem without uninstalling?

Chris Bray
0
 
LVL 3

Author Comment

by:chrisbray
ID: 36554088
Hi guramrit:

Your input enabled me to find the right search terms and google other solutions.

For the benefit of others, the actual solution is to reset the document design mode flag in the DocumentCompleted handler:

        private void WebBrowserBodyDocumentCompleted(object sender, WebBrowserDocumentCompletedEventArgs e)
        {
            if (webBrowserBody.Document != null)
            {
                var doc = webBrowserBody.Document.DomDocument as IHTMLDocument2;
                if (doc != null)
                {
                    doc.designMode = @"On";
                }
            }
        }

Open in new window

0
 
LVL 3

Author Closing Comment

by:chrisbray
ID: 36554090
Thanks for the pointer - the key thing was finding the right search terms to use in Google!

Chris Bray
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction Hi all and welcome to my first article on Experts Exchange. A while ago, someone asked me if i could do some tutorials on object oriented programming. I decided to do them on C#. Now you may ask me, why's that? Well, one of the re…
Wouldn’t it be nice if you could test whether an element is contained in an array by using a Contains method just like the one available on List objects? Wouldn’t it be good if you could write code like this? (CODE) In .NET 3.5, this is possible…
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …

610 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question