Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. Displaying HTML

Displaying HTML

Scheduled Pinned Locked Moved C#
htmlquestion
3 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • P Offline
    P Offline
    paulb
    wrote on last edited by
    #1

    How would I go about displaying a HTML document inside a windows form? Is there a control that can display HTML text?

    J T 2 Replies Last reply
    0
    • P paulb

      How would I go about displaying a HTML document inside a windows form? Is there a control that can display HTML text?

      J Offline
      J Offline
      James T Johnson
      wrote on last edited by
      #2

      You have to use the web browser activex control that comes with IE. There is an article here that tells how to use the control in your own .NET programs. James Simplicity Rules!

      1 Reply Last reply
      0
      • P paulb

        How would I go about displaying a HTML document inside a windows form? Is there a control that can display HTML text?

        T Offline
        T Offline
        Torsten Mauz
        wrote on last edited by
        #3

        Alternatively you can use the DHTML ActiveX control (DHTMLED.ocx) to use it, simply find the file (or download the latest copy from Microsoft), then add it to your toolbox and add it to your form as a normal control. The control as lots of methods that you can use to get HTML in to it, e.g. you can directly load a url: axDHTMLEdit1.LoadURL("http://www.codeproject.com"); or you can access the DOM to add HTML programatically: axDHTMLEdit1.DOM.body.innerHTML = "The Code Project"; I suggest you download the DHTMLEd SDK from Microsoft which includes documentation for all the properties and methods. This is a very powerful control but may be a bit of overkill for what you're doing.

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups