473,472 Members | 2,139 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

printing from a html form (AxWebBrowser)

Hi;

I have a form window that places an AxWebBrowser control in it and I can display html fine. However, I am now trying to print (and save and e-mail) the page. The following should, I believe, work. But nothing happens - it just returns. And I can't find any way to debug it running the script.

mshtml.IHTMLDocument2 doc = (mshtml.IHTMLDocument2)axWebBrowser.Document;
if (doc != null)
doc.parentWindow.execScript("window.print();", "JScript");

Any ideas?

thanks - dave
Nov 15 '05 #1
0 1138

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Hasani | last post by:
right now, for printing HTML in .net I use a AxBrowser and I do ExecWB(SHDocVw.OLECMDID.OLECMDID_PRINT, SHDocVw.OLECMDEXECOPT.OLECMDEXECOPT_DONTPROMPTUSER) I then call Application.DoEvents() in...
3
by: The Bear | last post by:
Does anyone know how to add a web browser to a Windows Form? thanks, The Bear
1
by: Curtis Justus | last post by:
Hi, My back is against the wall and I've tried to figure out something to do. Here is my scenario: I have an automated process running in a service that generates HTML files. Each resulting...
27
by: Michael C | last post by:
Anyone know of a good HTML Rendering control? I need a control that will render and display HTML in a Windows form. It doesn't need to pull down HTML pages from the Web - I'll feed it all the...
0
by: Marcin | last post by:
Hello! I've got problem with printing documents using AxWebBrowser in C#. In my code is: _content.ExecWB(SHDocVw.OLECMDID.OLECMDID_PRINT, SHDocVw.OLECMDEXECOPT.OLECMDEXECOPT_DODEFAULT, ref...
0
by: Curtis Justus | last post by:
Hi, I need to have the ability to take HTML files and print them out to a printer (each document may have to be sent to a different printer). This needs to be done without user interaction...
5
by: Tomaz Koritnik | last post by:
Hi I have many short HTML files stored in a binary stream storage to display descriptions for various items in application. HTML would be display inside application using some .NET control or...
2
by: Robert Kellogg | last post by:
Hello All, I'm having an issue with printing from AxWebBrowser.ExecWB.. The printing works just fine other then is always print from the default printer.. I'm sure there is a way to accomplish...
7
by: Jon B | last post by:
Hi There! I'm trying to print ASP.NET pages to the printer. I know I can grab the output contents of the ASP.NET page by using HttpWebRequest and HttpWebResponse objects. However, once I got the...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.