OnMouseMove application start taking more memory VB.NET

Hello,

I have created a VB.NET application.

On first form i have Textbox, Datagrid, Combo box and checkbox control.

There is no mouse move event in the form or datagrid.

But when i move the mouse on the form and see the memory usage
in task mamager..

Memory increase by 4k or 8k on each mouse.

Why it is behaving like that i have no Idea..

i tried with new project with one form, with one button button there also
memory get increased..

any idea to control not to increase the memory.

I have using Visual Studio 2003, with SP1 on Windows 2000 Prof. with SP4

Thanks in advance.

Regards
Amit Pandya

[645 byte] By [AmitPandya] at [2007-12-16]
# 1
Amit,

Even if you hadn't implemented OnMouseEvent() handler, your OnMouseMove messages are still processed by default. In Win32 they were processed by default window procedure.

Also, don't forget that each control on your form is derivered from System.Windows.Forms.Control which can also proceed the mouse messages by itself.

You can see the Windows' messages processing by using SPYXX util or similar.

Best regards,
Eugene

EugeneDorofeyev at 2007-9-9 > top of Msdn Tech,Windows Forms,Windows Forms General...
# 2
Eugene,

Any Idea how to control the increase on memory?

Amit Pandya

AmitPandya at 2007-9-9 > top of Msdn Tech,Windows Forms,Windows Forms General...
# 3

I do not know the 100%-"panacea". Try to override all the Mouse* handlers.

EugeneDorofeyev at 2007-9-9 > top of Msdn Tech,Windows Forms,Windows Forms General...