Preview control

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

    Preview control

    Hi,
    "Preview" is a worthy feature of Windows Explorer.
    I want to have a control which previews .HTML files in my form.
    How to do this ?



  • Maxim S. Lee

    #2
    Re: Preview control

    Hi!

    You can use COM object Microsoft Web Browser (customize your toolbox)
    After that put the web browser control to form.

    In your code it looks like:
    private AxSHDocVw.AxWeb Browser axWebBrowser1;

    You can get HTML content and show it so:
    object flags=null;
    object postData=null;
    object header=null;
    object targetFrame=nul l;
    axWebBrowser1.N avigate("www.na mip.ru", ref flags, ref targetFrame, ref
    postData, ref header);

    When the fetching will be finished you can do so:
    object pv = null;
    object pva = null;
    axWebBrowser1.E xecWB(SHDocVw.O LECMDID.OLECMDI D_PRINTPREVIEW, SHDocVw.OLECMDE XECOPT.OLECMDEX ECOPT_DODEFAULT ,ref
    pv, ref pva);

    Its work.


    #Hai wrote:[color=blue]
    > Hi,
    > "Preview" is a worthy feature of Windows Explorer.
    > I want to have a control which previews .HTML files in my form.
    > How to do this ?
    >
    >
    >[/color]

    Comment

    • Adam Byrne

      #3
      Re: Preview control

      Have a look at

      l_Extraction/article.asp
      if it's thumbnails you're after.

      -adam

      "Maxim S. Lee" <ils4ever@mail. ru> wrote in message
      news:#Nz5LcSQDH A.1024@TK2MSFTN GP12.phx.gbl...[color=blue]
      > Hi!
      >
      > You can use COM object Microsoft Web Browser (customize your toolbox)
      > After that put the web browser control to form.
      >
      > In your code it looks like:
      > private AxSHDocVw.AxWeb Browser axWebBrowser1;
      >
      > You can get HTML content and show it so:
      > object flags=null;
      > object postData=null;
      > object header=null;
      > object targetFrame=nul l;
      > axWebBrowser1.N avigate("www.na mip.ru", ref flags, ref targetFrame, ref
      > postData, ref header);
      >
      > When the fetching will be finished you can do so:
      > object pv = null;
      > object pva = null;
      >[/color]
      axWebBrowser1.E xecWB(SHDocVw.O LECMDID.OLECMDI D_PRINTPREVIEW, SHDocVw.OLECMDE X
      ECOPT.OLECMDEXE COPT_DODEFAULT, ref[color=blue]
      > pv, ref pva);
      >
      > Its work.
      >
      >
      > #Hai wrote:[color=green]
      > > Hi,
      > > "Preview" is a worthy feature of Windows Explorer.
      > > I want to have a control which previews .HTML files in my form.
      > > How to do this ?
      > >
      > >
      > >[/color]
      >[/color]


      Comment

      Working...