Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / WinForms > Forms, Dialogs, TitleBar, StatusStrip > RadForm event for Double Clicking the title bar

Not answered RadForm event for Double Clicking the title bar

Feed from this thread
  • Adrian avatar

    Posted on Jun 29, 2011 (permalink)

    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.

    Reply

  • Ivan Petrov Ivan Petrov admin's avatar

    Posted on Jul 5, 2011 (permalink)

    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)
      {
        case WM_NCLBUTTONDBLCLK:
          if (msg.WParam.ToInt32() == HTCAPTION)
            return;
          break;
      }
      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.

    Regards,
    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!

    Reply

Back to Top

Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / WinForms > Forms, Dialogs, TitleBar, StatusStrip > RadForm event for Double Clicking the title bar
Related resources for "RadForm event for Double Clicking the title bar"

[ Features | Demos | Documentation | Knowledge Base | Telerik TV | Code Library | Step-by-step Tutorial | Blogs | Self-Paced Trainer ]