none
What development tools support the webbrowser control with events?

    Pertanyaan

  • During the course of a webbrowser control MS support incident (which turned out to be an IE9 bug, fixed on Dec 13), the IE group support rep was trying to nudge me in the direction of redevelopment in unmanaged VC++ with MFC.

    Currently, we have a commercial literacy software product, which includes the webbrowser control, written in VB6. Works fine under Windows 7, and also the preview version of Windows 8.

    But it probably won't work at some point, and I'd like to get started with something. I had been anticipating doing this in C#, but according to the rep, who pointed out http://support.microsoft.com/kb/934368 , you can't reliably handle document events using .net.

    First, I was wondering if there is agreement in the community of webbrowser developers that .net isn't really viable (if you're capturing events). If so, this may mean that the only MS development environment is unmanaged VC++, which seems odd. This would also involve a probably largish learning curve, and be a resource drain just as we’re in the midst of marketing!

    Second, are their other development environments that are easier? The reason I chose VB6 in the first place (I had been a C programmer) was that Scott Roberts' IE5 development book sort of suggested it as an environment in which one develop code 10x faster (or something like that)!

    All suggestions appreciated!


    Steve Siegel




    • Diedit oleh Steveny 17 Februari 2012 2:54
    17 Februari 2012 2:47

Semua Balasan

  • IHMO .Net isn't viable for performance and stability regarding COM interop. Releasing a CLR COM wrapper is dangerous. In Visual Studio 2010, Microsoft asks each and every caller of Marshal.ReleaseComObject to justify the call. As you probably guessed, this leads to COM objects living longer than the component authors originally planned. And GC does not happen often enough, sometimes programmers need to hit Ctrl-Alt-Shift-F12 twice to force a GC. 

    There are other options, C++ isn't the only native language (you previous choice VB is another), but comparing the amount of examples and tutorials out there, using C++ may be your best choice if you want to get something quick.

    MFC has code that you can start hosting an ActiveX pretty easily, but it isn't the only class library that has ActiveX hosting support. I think ATL is another excellent choice as it has much more COM support. If you don't like paying for Visual Studio, you can base your code on the TSTCON sample from Windows SDK, or use other C++ frameworts that has ActiveX support.



    The following is signature, not part of post
    Please mark the post answered your question as the answer, and mark other helpful posts as helpful, so they will appear differently to other users who are visiting your thread for the same problem.
    Visual C++ MVP



    17 Februari 2012 5:05
  • Thanks very much Sheng. Any clarifying news is helpful news! I'm trying for an easy (relatively) way out of this. Like MS bringing back VB6 for the webbrowser contriol, which is not going to happen! Or perhaps some 3rd party development environment which insulates you from having to learn COM and so on. But, I do have Ivan Horton's Begining VC++ 2010 by on my file cabinet. Hoping some way some how I don't need to read it! (As an MSDN subscriber, I do, BTW, have VS 2010.)

    If I do go the VC++ route, once I get to a working knowledge, I imagine there's code I can find and reuse for browsing and document event capture purposes.

    Thanks again!

    PS - To date I've been betting that complete discontinuation of compatability for VB6 binary would be too harmful for MS, but that betting stops with Windows 9! (Although my guess is it will still work.)


    Steve Siegel

    17 Februari 2012 7:34
  • http://www.codeproject.com/KB/shell/#IE+Programming is a good resource repository


    The following is signature, not part of post
    Please mark the post answered your question as the answer, and mark other helpful posts as helpful, so they will appear differently to other users who are visiting your thread for the same problem.
    Visual C++ MVP

    17 Februari 2012 16:47
  • Thanks again, Sheng. With regard to examples, VC++ may indeed currently be the best choice. Only, it seems odd that unmanaged VC++ would be the only development tool that MS currently offers for webbrowser development. I'm trying to see if any other solutions (comparable to VB6, for example), exist, either from MS or a 3rd party.

    Thanks again,

    Steve


    Steve Siegel



    • Diedit oleh Steveny 20 Februari 2012 8:36
    20 Februari 2012 8:32