public Form1() { this.InitializeComponent(); this.htDevice = new HtmlDevice(); this.htCompiler = HtEngine.GetCompiler(); HtEngine.RegisterDevice(this.htDevice); HtEngine.DefaultFontSize = 14; HtEngine.DefaultFontFace = "Arial"; this.pictureBox1.BackColor = Color.RoyalBlue; this.pictureBox1.MouseMove += (sender, args) => { this.pictureBox1.Cursor = this.htCompiler.GetLink(args.X, args.Y) == null ? Cursors.Default : Cursors.Hand; }; this.pictureBox1.MouseClick += (sender, args) => { string link = this.htCompiler.GetLink(args.X, args.Y); if (link != null) { MessageBox.Show("Link clicked: " + link); } }; }
public Form1() { this.InitializeComponent(); this.htDevice = new HtmlDevice(); this.htCompiler = HtEngine.GetCompiler(); HtEngine.RegisterDevice(this.htDevice); HtEngine.DefaultFontSize = 14; HtEngine.DefaultFontFace = "Arial"; this.pictureBox1.BackColor = Color.RoyalBlue; this.pictureBox1.MouseMove += (sender, args) => { this.pictureBox1.Cursor = this.htCompiler.GetLink(args.X, args.Y) == null ? Cursors.Default : Cursors.Hand; }; this.pictureBox1.MouseClick += (sender, args) => { string link = this.htCompiler.GetLink(args.X, args.Y); if (link != null) MessageBox.Show("Link clicked: " + link); }; }