Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 526309
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T08:45:45+00:00 2026-05-13T08:45:45+00:00

The WinForms GroupBox control doesn’t support MouseMove (or at least, not consistently), and I

  • 0

The WinForms GroupBox control doesn’t support MouseMove (or at least, not consistently), and I don’t understand why.

Since it descends from Control, it does have a MouseMove event, but GroupBox explicitly reintroduces it with Browsable(false), so it’s not shown in the Property Grid. You can hook the MouseMove event at runtime, and sometimes it works — as long as FlatStyle is left at Standard. If the GroupBox’s FlatStyle is set to System, then no MouseMove events are fired at all.

Reflector hasn’t given me any clues. The GroupBox constructor doesn’t seem to be setting any strange control styles, and GroupBox doesn’t do anything silly like override MouseMove and fail to call base.

This also appears to be a WinForms-specific limitation, because Delphi group boxes support OnMouseMove just fine. Correction: the comparison to Delphi isn’t valid. Delphi group boxes aren’t actually standard BM_GROUPBOX controls; they’re just painted to look like group boxes, without actually inheriting strange groupbox behaviors like this. So this may well be a limitation of the Windows groupbox control, though I haven’t seen it documented anywhere.

Why does the WinForms GroupBox not support MouseMove?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T08:45:45+00:00Added an answer on May 13, 2026 at 8:45 am

    According to this thread, a standard Windows groupbox (i.e., a BUTTON control with BS_GROUPBOX style) appears to return HTTRANSPARENT in response to WM_NCHITTEST. Since the control claims to be transparent, Windows sends the mouse-move events to its parent window instead.

    The thread confirms that, if you handle WM_NCHITTEST yourself and return HTCLIENT, then the groupbox will get mouse-move events. They’re using MFC but it probably works for WinForms as well.

    What’s not clear is why Windows returns HTTRANSPARENT by default, but at least the problem has been independently confirmed.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a WinForms form hosted in VB6 application (I am not sure if
In WinForms, I'd use Application.ProductVersion . I've tried using System.Reflection.Assembly in various ways but
In WinForms I would use the rich text box to show the live output
I noticed the WinForms RichTextBox has a ZoomFactor property that I assume is exactly
I have a WinForms application. That application have a rich functionality. It can create
In a VB.NET Winforms application, I have a form that contains both a datagridview
I'm currently using winforms databinding to wire up a data editing form. I'm using
I've got a WinForms app with the following code: static void Main() { IKernel
I'm using winforms and vb.net. When I right click on a textbox I get
This is a C# winforms app. Preface: I am creating a form that will

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.