0

my question might be crazy, I know it has to be something like COM, but I need to include and COM a specific version of Web browser in my application no matter what version of the browser the computer currently is using, say to include IE7(dll file or whatever) in the project and COM programming it as a window in C++ application to surf web pages on internet although the default browser in client machine is IE9. And deploy the compiled project with IE7 file(s) to client machines. If IE/COM won't work that way, any other browsers can do the tricks?

Many Thanks!

CanadaYong

noseratio
  • 59,932
  • 34
  • 208
  • 486
Yonge
  • 1
  • 3
  • If you can get your work done by using webkit then here is some help: http://stackoverflow.com/questions/1924255/how-to-embed-webkit-into-my-c-c-win32-application – Manoj Awasthi Sep 04 '13 at 03:44
  • I also need to automatically populate some fields on certain pages or automatically upload files and click buttons? is it possible to be implemented thru WebKit? Thanks! – Yonge Sep 04 '13 at 03:55
  • 1
    At least with IE, I doubt it's possible. It's treated as part of the OS, so the only version that's available is what's installed as part of the OS. If the user has IE9, then IE7 simply isn't available. – Jerry Coffin Sep 04 '13 at 05:20

1 Answers1

3

No, you cannot "embed" a specific version of Internet Explorer in your application. But you probably don't need to: when you use the IE COM WebBrowser Control in your application, by default it runs in IE7 Compatibility mode. Later modes are only used if you explicitly set the FEATURE_BROWSER_EMULATION registry key listing your executable name.

EricLaw
  • 56,563
  • 7
  • 151
  • 196
  • most of clients machines may have flash installed, which may interfer with the application, is there way to disbale flash to mimic a clean IE environment. – Yonge Sep 05 '13 at 16:28
  • In what way does it "interfere"? Technically, yes, you can configure the Web Browser host to disable all/any ActiveX control, but the code to do so is non-trivial. – EricLaw Sep 05 '13 at 17:18
  • Without flash, I can getElementById a submit button, but if flash installed, I cannot, as the the button has be set as a flash button, I can not issue a button click event on flash button. Maybe some pages are designed that way to accommodate flash or non flash. But in my application I don't want flash for sure. Thanks ! – Yonge Sep 05 '13 at 21:48
  • I wrote a little bit on how to do this here: http://blogs.msdn.com/b/ieinternals/archive/2012/05/30/ieinternals-random-tidbits.aspx but I haven't provided a full code sample. – EricLaw Sep 05 '13 at 23:12
  • Thanks you all, I have given it up and seek other solutions easier to approach. – Yonge Sep 06 '13 at 14:17