RadForm event for Double Clicking the title bar

2 posts, 0 answers
  1. Adrian
    Adrian avatar
    6 posts
    Member since:
    May 2009

    Posted 29 Jun 2011 Link to this post

    I can't seem to find the event that is fired when the Title Bar of a RadForm is double clicked.
    My form is maximized at all times and I don't want the user to change the size of the windown by double clicking the title bar. Form should always stay at maximized state and this (this.WindowState = System.Windows.Forms.FormWindowState.Maximized) is not preventing the resize on Title Bar double click.

     MaximizeBox property is set to False to prevent the user from clicking the form's maximize button. This part is working fine.
  2. Ivan Petrov
    Ivan Petrov avatar
    707 posts

    Posted 05 Jul 2011 Link to this post

    Hi Adrian,

    Thank you for writing.

    Please consider the following code snippet:

    const Int32 HTCAPTION = 0x2;
    const Int32 WM_NCLBUTTONDBLCLK = 0xA3;
    protected override void WndProc(ref Message msg)
      switch (msg.Msg)
          if (msg.WParam.ToInt32() == HTCAPTION)
      base.WndProc(ref msg);

    You have to add these constants and the method to your form.

    I hope this will help. If you have further questions, feel free to ask.

    Ivan Petrov
    the Telerik team
    Registration for Q2 2011 What’s New Webinar Week is now open. Mark your calendar for the week starting July 18th and book your seat for a walk through all the exciting stuff we ship with the new release!
Back to Top