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

x
?
Solved

Problem loading webpage in web browser control from excel

Posted on 2011-02-22
7
Medium Priority
?
644 Views
Last Modified: 2013-11-08
Hi,

I have an application in C# which adds custom toolbar to excel. I have a requirement where in I need to load a windows form having a web browser control when one of the buttons of the toolbar is clicked and navigate a web page in that web browser control.

The problem I'm facing is any page navigated from this web browser control is rendering in IE 6.0 format. All the controls in the webpage scrollbars, combo boxes etc. are all rendered in IE 6.0 format when I'm having IE 8.0 in my system.
0
Comment
Question by:pkoivula
[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
  • 4
  • 2
7 Comments
 
LVL 10

Expert Comment

by:John Claes
ID: 34959161
What version does the WebControl Dll have?
You can have an other version of IE installed but still using the older DLL's in your application.

regards

poor beggar
0
 

Author Comment

by:pkoivula
ID: 34959391
Webbrowser is a control of System.Windows.Forms dll whose version is 2.0.50727.3053.

It is working fine when I use the webbrowser in a standalone windows application.
0
 
LVL 33

Expert Comment

by:Todd Gerbert
ID: 34960955
What do you mean by "rendering in IE 6.0 format"?  Have your WebBrowser control navigate to the URL res://ieframe.dll/about.dlg, you should see the Internet Explorer "About" dialog - which will indicate which version of IE the control's using.
0
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.

 

Author Comment

by:pkoivula
ID: 34968547
It means all the controls of the webpage are shown as in IE 6.0 mode. For Example, scrollbars style is gray in IE 6.0  whereas in IE 7.0 or IE 8.0 it is blue. I'm having windows XP Professional in my system.


In my application the excel toolbar is created using a Shared Addin in Visual Studio 2008. When a windows form having webbrowser control is loaded from excel toolbar button click event, the web page is loaded in IE 6.0 mode whatever maybe the version of IE in the system. I have checked this in Windows 7 system also which comes with IE 8.0 as default browser.
I can see the same problem in Windows 7 system also.


But when I'm loading excel toolbar using automation (not COM) addin, the webpage is loading properly (Web browser works as the version of IE in the system). Plz suggest what could be the problem?
0
 

Author Comment

by:pkoivula
ID: 34994661
I got the root cause for the problem that I was facing with the web browser used in a Shared Addin. I thought the problem is with web browser and the web page is rendering in IE 6.0 format since the webpage appeared to be in some old format.

Actually the problem is with Windows form loaded from a button click in a Excel SharedAddin.
Not only the web browser, if we add windows controls like scroll bars (vertical / horizontal), combobox, radio button, checkbox, button, progressbar etc to the windows form, they are having old style at runtime(like vs 2003 controls).

But still no idea about the solution for this problem.

0
 
LVL 33

Accepted Solution

by:
Todd Gerbert earned 2000 total points
ID: 35021489
Googling around, it would seem your add-in needs to call System.Windows.Forms.Application.EnableVisualStyles() prior to showing forms.
0
 

Author Comment

by:pkoivula
ID: 35024080
Thank you...it worked
0

Featured Post

Get your Disaster Recovery as a Service basics

Disaster Recovery as a Service is one go-to solution that revolutionizes DR planning. Implementing DRaaS could be an efficient process, easily accessible to non-DR experts. Learn about monitoring, testing, executing failovers and failbacks to ensure a "healthy" DR environment.

Question has a verified solution.

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

More often than not, we developers are confronted with a need: a need to make some kind of magic happen via code. Whether it is for a client, for the boss, or for our own personal projects, the need must be satisfied. Most of the time, the Framework…
This article is for Object-Oriented Programming (OOP) beginners. An Interface contains declarations of events, indexers, methods and/or properties. Any class which implements the Interface should provide the concrete implementation for each Inter…
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…

604 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