[Mono-winforms-list] WebBrowser + Printing

Rocky1 rocky1 at netcourrier.com
Mon Dec 8 14:59:10 EST 2008

If it can help, here is the code I used :

using System;
using System.Windows.Forms;

public class Form1 : Form
    private WebBrowser webBrowser1 = new WebBrowser();
    private Button button1 = new Button();

    public static void Main()
        Application.Run(new Form1());

    public Form1()
        button1.Text = "Print";
        button1.Dock = DockStyle.Top;
        button1.Click += new EventHandler(button1_Click);
        webBrowser1.Dock = DockStyle.Fill;
        Load += new EventHandler(Form1_Load);
        Text = "Internet Explorer";

    private void Form1_Load(object sender, EventArgs e)


    private void button1_Click(object sender, EventArgs e)


It's a modified example found in MSDN. The web page is a Javascript tutorial
where you can test the "print" function.
View this message in context: http://www.nabble.com/WebBrowser-%2B-Printing-tp20745942p20902408.html
Sent from the Mono - WinForms mailing list archive at Nabble.com.

More information about the Mono-winforms-list mailing list