Displaying HTML within a Windows Form as if it were a WebForm

Back when I programmed C++ using ATL there was a way to do this.  Does anyone know if there is a way to do this in .Net using C# for instance.  

Much thanks,
-the rocket


Answer this question

Displaying HTML within a Windows Form as if it were a WebForm

  • M S K Aditya

    Thanks batnight this is just what I was looking for.  This is a great article and I heartily recommend it to anyone looking for a rich presentation layer in a Windows Forms app.  Please be aware that you will have to cough up a little coin for it though.

    thanks,
    -the rocket

  • saurabhdotnet

    What about using the httpwebrequest class  I haven't tried it myself, but it looks like it might work.
  • APMadsen

    That class looks like a very interesting class and it will let me send and receive HTTP posts and gets asynchronously, however what I am looking for is a way to display HTML from within a Windows Form as if it were a browser window.  This is probably going to be a control and I have been playing around with 'AxSHDocVw.AxWebBrowser' with little success.  What would be very useful at this point would be some sample code.

    Thanks very much though,
    -the rocket

  • allenmpcx

    I actually got this working but not without much difficulty.  It is not quite as straight forward as it might seem.  I stumbled across this kb article which was a great help and now have it figured out.

    http://support.microsoft.com/default.aspx scid=kb;en-us;325079

    Thanks for your suggestions,
    -the rocket

  • Kjeld Tommeraas

    The only current way to display HTML on a Windows Forms app is with the Web Browser ActiveX Control (shdocvw.dll).  It sounds like this is what you've been experiementing with.  Because this is an ActiveX control there are some limitations, semi trusted access being the primary one.

    What issues are you hitting that cause you to descirbe your Web Browser control experience as producing "little success"

    Another option is to convert the HTML to rtf and use the RichTExtBox control to display it.  I'm sure a google search on "HTML to RTF" would get you some samples of this.

    good luck
     - mike

  • Mkely


    Check out the following article in C# Today:

    http://www.csharptoday.com/content.asp id=1980

  • Displaying HTML within a Windows Form as if it were a WebForm