CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    May 2001
    Posts
    3

    ie5 browser ocx Properties

    Setting Document/Printer Properties with ie5 browser ocx or with html

    I want to print html forms in differen sizes, orintation with the browser control.

    I tried three approaches:
    1. size and orientation in the .html file
    example: <style> @page { size:21.0cm 14.5cm;landscape } </style>
    but this needs CSS2 support which the internet explorer does not
    -or is there another way?

    2. application driven
    at the moment i have a small VB sample application that works quit well

    WebBrowser.Navigate (AnyUrl)

    Private Sub WebBrowser_DocumentComplete(ByVal pDisp As Object, URL As Variant)
    WebBrowser.ExecWB OLECMDID_PRINT, OLECMDEXECOPT_PROMPTUSER
    End Sub

    except for the fact, that i have to configure the printer manually
    OLECMDEXECOPT_PROMPTUSER shows the printer dialog but i would rather use
    OLECMDEXECOPT_DONTPROMPTUSER and apply the settings programatically

    -can i change the settings with VB or do i have to do this in C++ using COM?
    -does anyone hav an example.
    -i am a C++ programmer with some basic knowledge of MFC.
    -but i dont know how to handle IPrint::Print with DEVMODE

    3. default printer settings
    i also tried to change the printer properties (start/settings/printers)
    but the browser just does not use them.
    may be there is somewhere a template i could use
    internet explorer/ properties / general (tab) / accessibility (button) / user style sheet
    -how must a stylesheet look?
    -would it work like this? or are these stylesheets only for display?

    ---------------------------------------------------------------------------------------------------------------------------------------------

    Yours Sincerely // Mit freundlichen Grüssen

    Theo Portmann
    _____________________________________________

    Atraxis AG
    CEPM
    CH-8058 Zurich-Airport

    Phone: +41 1 812 28 63
    Telefax: +41 1 812 90 31
    Telex: ZRHQGSR
    E-mail: [email protected]




  2. #2
    Join Date
    Nov 2001
    Location
    Chennai, TN, India
    Posts
    37

    How to use WebBrowser2 control in my dialog

    I am in need to use WebBrowser2 control in my dialog (non mfc). sisce this is possible in vb, i trust, it can also be done in VC also. I am using a WinMain SDK application.


  3. #3
    Join Date
    Jan 2002
    Posts
    32

    Re: ie5 browser ocx Properties

    Hi Theo,

    I am currently having a similar problem with printing web/html reports and wanting to have custom headers/footers. So when I print a three page html page I have a header and footer on each page.

    If you found out any info I would appreciate it.

    Thanks in advance.

    Naz



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured