- Press mouse left button on windows form control

- Don't move mouse and release the left button

The mouse message will be "WM_MouseDown", "WM_MouseUP", "WM_MouseCaptureChanged" and "WM_MouseMove"

Why does control receive the last receive message


- Write a custom control inherit from system control

- Override WndProc function, adn write the following code:
public class MyControl2 : Control
protected override void WndProc(ref Message m)

//WM_LButtonUp message
if (m.Msg == 0x202)

base.WndProc(ref m);


- Repeat the action in usecase1

the mouse message will be "WM_MouseDown", "WM_MouseUP",

Why does the last MouseMove message disappaer

Re: Windows Forms General About MouseMove message


You get the MouseMove message because the mouse capture was released. In the 2nd case, you don't give it a chance to detect MouseUp so it won't release the capture.