VB 6/.NET Code on 2003 Server won't print html file from WebBrowser or axDHTMLEDLib

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • ems9tech
    New Member
    • Apr 2009
    • 12

    VB 6/.NET Code on 2003 Server won't print html file from WebBrowser or axDHTMLEDLib

    I have code that works fine on my XP machine. It loads an HTML document into the VB 6 WebBrowser control and then uses the following command to print the document without any print dialog box:

    mfrmPrint.WebBr owser1.ExecWB OLECMDID_PRINT, OLECMDEXECOPT_D ONTPROMPTUSER, PRINT_DONTBOTHE RUSER_WAITFORCO MPLETION

    I have also just implemented a .NET C# DLL that uses the axDHTMLEDLib. It also works fine on my XP computer.

    It seems like a simple IE or machine configuration problem. When I open the Internet Explorer 6 browser, the following message is displayed.

    Internet Explorer Enhanced Security Configuration is enabled

    I have tried removing this (apparently some present IE security settings) and it didn't do the trick.

    Thanks for any ideas.
  • Plater
    Recognized Expert Expert
    • Apr 2007
    • 7872

    #2
    Does your server have the vbrun6.dll? Is there a benefit to not using the .NET webbrowser control in favor of the vb6 control?

    Comment

    • ems9tech
      New Member
      • Apr 2009
      • 12

      #3
      Various VB 6 programs are running fine on the server. I put the code in VB 6 because there seemed to be more examples of working WebBrowser code. I could try doing it in .NET, but I still think the problem isn't the code but some configuration on the Windows 2003 Server...

      Comment

      • ems9tech
        New Member
        • Apr 2009
        • 12

        #4
        Still Nothing on my end - anyone else?

        I get no errors, but nothing is sent to the Printer Queue (I have it paused so I'm sure).

        I did disable Enhanced Security, but no change. I have had an issue in the past with this code getting errors and fixed it by reinstalling IE 6 using method 3 in this MS article:

        How to reinstall or repair Internet Explorer in Windows Vista and Windows XP

        I just discovered that the Server has IE 7 installed and I have IE 6 on my XP machine (It also works on a co-worker's XP with IE 6 machine). I believe the issue is with IE 7 and probably specifically it's security.

        I have tried all of the suggestions I could get from this article to no avail (even re-booted after making the registry changes):

        Visual Basic 6 And Internet Explorer 7

        Added the following to Trusted Sites: IP Address of Printer Port

        I think my solution may just be to uninstall IE 7 and install IE 6... :~(

        Comment

        • ems9tech
          New Member
          • Apr 2009
          • 12

          #5
          Does it make any difference that the 2003 Server is also a VMware environment?

          Comment

          Working...