Rendering HTML inside Windows Forms

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Jay

    #1

    Rendering HTML inside Windows Forms

    Hi all,

    May i know if there is any way by which we can render a
    given HTML inside .NET Windows Forms?

    We had the Web Browser controls in Visual Studio 6. Is
    there a follow-up of that in VS.NET?

    Most recently, HTML rendered dialog boxes seemms to be in
    vogue. Can anyone please help?

    Thanks so much in advance,
    Jay
  • Nicholas Paldino [.NET/C# MVP]

    #2
    Re: Rendering HTML inside Windows Forms

    Jay,

    You can use the WebBrowser control in .NET. In VS.NET, right click on
    the toolbox and then select "Customize" . A dialog will appear. There
    should be a tab for "COM", under which the WebBrowser control will be
    listed.

    Hope this helps.


    --
    - Nicholas Paldino [.NET/C# MVP]
    - mvp@spam.guard. caspershouse.co m

    "Jay" <jayakrishnanm@ hotmail.com> wrote in message
    news:06b701c3b8 2f$44a5b4f0$a00 1280a@phx.gbl.. .[color=blue]
    > Hi all,
    >
    > May i know if there is any way by which we can render a
    > given HTML inside .NET Windows Forms?
    >
    > We had the Web Browser controls in Visual Studio 6. Is
    > there a follow-up of that in VS.NET?
    >
    > Most recently, HTML rendered dialog boxes seemms to be in
    > vogue. Can anyone please help?
    >
    > Thanks so much in advance,
    > Jay[/color]


    Comment

    • Rakesh

      #3
      Re: Rendering HTML inside Windows Forms

      Hi,

      But even then, is it possible to access the html controls
      embedded within the html page (for example i want to
      access the check boxes within it)? If yes, how?

      Thanks,
      Rakesh

      [color=blue]
      >-----Original Message-----
      >Jay,
      >
      > You can use the WebBrowser control in .NET. In[/color]
      VS.NET, right click on[color=blue]
      >the toolbox and then select "Customize" . A dialog will[/color]
      appear. There[color=blue]
      >should be a tab for "COM", under which the WebBrowser[/color]
      control will be[color=blue]
      >listed.
      >
      > Hope this helps.
      >
      >
      >--
      > - Nicholas Paldino [.NET/C# MVP]
      > - mvp@spam.guard. caspershouse.co m
      >
      >"Jay" <jayakrishnanm@ hotmail.com> wrote in message
      >news:06b701c3b 82f$44a5b4f0$a0 01280a@phx.gbl. ..[color=green]
      >> Hi all,
      >>
      >> May i know if there is any way by which we can render a
      >> given HTML inside .NET Windows Forms?
      >>
      >> We had the Web Browser controls in Visual Studio 6. Is
      >> there a follow-up of that in VS.NET?
      >>
      >> Most recently, HTML rendered dialog boxes seemms to be[/color][/color]
      in[color=blue][color=green]
      >> vogue. Can anyone please help?
      >>
      >> Thanks so much in advance,
      >> Jay[/color]
      >
      >
      >.
      >[/color]

      Comment

      • Nicholas Paldino [.NET/C# MVP]

        #4
        Re: Rendering HTML inside Windows Forms

        Rakesh,

        Yes, it is. You will then have to set a reference to Microsoft MSHTML
        in your project. The Document property on the WebBrowser will expose the
        Document Object Model on the instance and you can access everything on the
        HTML page through there.


        --
        - Nicholas Paldino [.NET/C# MVP]
        - mvp@spam.guard. caspershouse.co m

        "Rakesh" <anonymous@disc ussions.microso ft.com> wrote in message
        news:069201c3b8 8b$6ed7b0a0$a40 1280a@phx.gbl.. .[color=blue]
        > Hi,
        >
        > But even then, is it possible to access the html controls
        > embedded within the html page (for example i want to
        > access the check boxes within it)? If yes, how?
        >
        > Thanks,
        > Rakesh
        >
        >[color=green]
        > >-----Original Message-----
        > >Jay,
        > >
        > > You can use the WebBrowser control in .NET. In[/color]
        > VS.NET, right click on[color=green]
        > >the toolbox and then select "Customize" . A dialog will[/color]
        > appear. There[color=green]
        > >should be a tab for "COM", under which the WebBrowser[/color]
        > control will be[color=green]
        > >listed.
        > >
        > > Hope this helps.
        > >
        > >
        > >--
        > > - Nicholas Paldino [.NET/C# MVP]
        > > - mvp@spam.guard. caspershouse.co m
        > >
        > >"Jay" <jayakrishnanm@ hotmail.com> wrote in message
        > >news:06b701c3b 82f$44a5b4f0$a0 01280a@phx.gbl. ..[color=darkred]
        > >> Hi all,
        > >>
        > >> May i know if there is any way by which we can render a
        > >> given HTML inside .NET Windows Forms?
        > >>
        > >> We had the Web Browser controls in Visual Studio 6. Is
        > >> there a follow-up of that in VS.NET?
        > >>
        > >> Most recently, HTML rendered dialog boxes seemms to be[/color][/color]
        > in[color=green][color=darkred]
        > >> vogue. Can anyone please help?
        > >>
        > >> Thanks so much in advance,
        > >> Jay[/color]
        > >
        > >
        > >.
        > >[/color][/color]


        Comment

        • Sunny

          #5
          Re: Rendering HTML inside Windows Forms

          Hi Rakesh,

          In article <069201c3b88b$6 ed7b0a0$a401280 a@phx.gbl>,
          anonymous@discu ssions.microsof t.com says...[color=blue]
          > Hi,
          >
          > But even then, is it possible to access the html controls
          > embedded within the html page (for example i want to
          > access the check boxes within it)? If yes, how?
          >
          > Thanks,
          > Rakesh
          >[/color]

          Yes, you can.

          mshtml.IHTMLDoc ument2 mydoc = (mshtml.IHTMLDo cument2)
          mybrowsercontro l.Document;

          You have to add reference to mshtml library to your project.

          After that you can access all elements of mydoc (the rendered HTML
          document).

          Hope that helps
          Sunny

          Comment

          Working...