New to Telerik UI for WinForms? Start a free 30-day trial
Detecting when the User Drags the RadTitleBar
Updated on Sep 24, 2026
The following example, demonstrates how to detect when the user drags the title bar and to how to get its coordinates:
Detecting when the TitleBar is dragged
C#
public const int WM_WINDOWPOSCHANGED = 0x47;
protected override void WndProc(ref Message m)
{
if (m.Msg == WM_WINDOWPOSCHANGED)
{
this.Text = Control.MousePosition.ToString();
}
base.WndProc(ref m);
}