private void CalculateContentHeight() { Graphics g = this.CreateGraphics(); SizeF overallSize = default(SizeF); Point pt = default(Point);this.Font.Style); SendMessageW(this.Handle, EM_GETSCROLLPOS, 0, ref pt); overallSize = TextRenderer.MeasureText(g, Text, Font); // send max value and value to any listenting controls so they can scroll syncronously if (this.Scroll != null) this.Scroll(this, new ScrollEventArgs(pt.Y, Convert.ToInt32(overallSize.Height - this.Height))); }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)