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

  • Home
  • SEARCH
  • 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

In WinForms, I can design a form and have a TabValue to control which
My WinForms application has a tab with a System.Windows.Forms.WebBrowser control. There are several controls
My WinForms app uses a number of BackgroundWorker objects to retrieve information from a
With WinForms, I can use Control.Scale to scale a control larger. When I do
The WinForms TextBox has an 'Undo' command but has not a 'Redo' command -
I have a WinForms application with a DataGridView control and a column of DataGridViewButtonCell
WinForms C#.. am getting some JSON in the format below (bottom of message) and
Our WinForms application has been reported to occasionally just close on its own. It
In Winforms you can say if ( DesignMode ) { // Do something that
(Using WinForms and C#. -> .Net 2.0) I am adding nodes to a TreeView

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.