/// <summary> /// Perform paint of the html in the control. /// </summary> protected override void OnPaint(PaintEventArgs e) { base.OnPaint(e); if (_htmlContainer != null) { e.Graphics.TextRenderingHint = TextRenderingHint.ClearTypeGridFit; _htmlContainer.PerformPaint(e.Graphics); } }
/// <summary> /// Perform paint of the html in the control. /// </summary> protected override void OnPaint(PaintEventArgs e) { base.OnPaint(e); if (_htmlContainer != null) { _htmlContainer.ScrollOffset = AutoScrollPosition; _htmlContainer.PerformPaint(e.Graphics); // call mouse move to handle paint after scroll or html change affecting mouse cursor. Point mp = PointToClient(MousePosition); _htmlContainer.HandleMouseMove(this, new MouseEventArgs(MouseButtons.None, 0, mp.X, mp.Y, 0)); } }
/// <summary> /// Draw the html using the tooltip graphics. /// </summary> private void OnToolTipDraw(object sender, DrawToolTipEventArgs e) { if (_tooltipHandle == IntPtr.Zero) { // get the handle of the tooltip window using the graphics device context IntPtr hdc = e.Graphics.GetHdc(); _tooltipHandle = Win32Utils.WindowFromDC(hdc); e.Graphics.ReleaseHdc(hdc); AdjustTooltipPosition(e.AssociatedControl, e.Bounds.Size); } e.Graphics.Clear(Color.White); _htmlContainer.PerformPaint(e.Graphics); }