473,385 Members | 1,930 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Overrides Sub onMouseMove

I have added the Overrides proc onMouseMove like
Protected Overrides Sub onMouseMove(ByVal e As
System.Windows.Forms.MouseEventArgs)

...........

End Sub

This proc supposed to fire when I move the mouse. When I am moving mouse
over the form it fires. But if mouse is over any control (textbox, listbox
etc) procedure does not fire.

I need to catch mouse move over the datagrid.

What is wrong?

Thank you


Nov 20 '05 #1
5 2235
The mouse move message doesn't go to the form when the mouse is over another
control - it goes to that control.

"Iouri" <io***@hotsheet.com> wrote in message
news:u$**************@TK2MSFTNGP12.phx.gbl...
I have added the Overrides proc onMouseMove like
Protected Overrides Sub onMouseMove(ByVal e As
System.Windows.Forms.MouseEventArgs)

..........

End Sub

This proc supposed to fire when I move the mouse. When I am moving mouse
over the form it fires. But if mouse is over any control (textbox, listbox
etc) procedure does not fire.

I need to catch mouse move over the datagrid.

What is wrong?

Thank you

Nov 20 '05 #2
How about using the Data Grids mousemove?
Nov 20 '05 #3
Cor
Hi Iouri
I need to catch mouse move over the datagrid.

What is wrong?

I think that you search for a very difficult solution while the events
mouseEnter and a MouseLeave from the datagrid could be sufficient.

Cor
Nov 20 '05 #4
I need to verride the column resizing
if I am doing like
Protected Overrides Sub onMouseMove(ByVal e As
System.Windows.Forms.MouseEventArgs)

Dim hti As DataGrid.HitTestInfo = dg.HitTest(New Point(e.X, e.Y))

If hti.Type = DataGrid.HitTestType.ColumnResize Then

Return 'no baseclass call

End If

MyBase.OnMouseMove(e)

End Sub

it does not fire because it is over control

If I am using

Private Sub dg_MouseMove(ByVal sender As Object, ByVal e As
System.Windows.Forms.MouseEventArgs) Handles dg.MouseMove

it fires, but does not override
"Iouri" <io***@hotsheet.com> wrote in message
news:u$**************@TK2MSFTNGP12.phx.gbl...
I have added the Overrides proc onMouseMove like
Protected Overrides Sub onMouseMove(ByVal e As
System.Windows.Forms.MouseEventArgs)

..........

End Sub

This proc supposed to fire when I move the mouse. When I am moving mouse
over the form it fires. But if mouse is over any control (textbox, listbox
etc) procedure does not fire.

I need to catch mouse move over the datagrid.

What is wrong?

Thank you

Nov 20 '05 #5
Thank you
"Charlie Williams" <an*******@discussions.microsoft.com> wrote in message
news:A4**********************************@microsof t.com...
If you wish to override the base functionality, you should derive from DataGrid and override OnMouseMove. By handling the event, you are simply
being notified when the mouse is moved and nothing more.
Alternatively, you could explicitly set the width of the column if the user tries to resize it.
As an aside, I, myself, would think twice about using an app that

intentionally went out of its way to make the UI less customizable. But
that's just me...
Nov 20 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Gary Mayor | last post by:
Hi, I'm re phrasing and earlier question as the earlier question doesn't make to much sense. I using document.onmousemove to move a <div line on the screen. At the moment if I click and move the...
2
by: Mariusz | last post by:
Hello, I'm trying to do drag'n'drop where You can see elements that You are dragging (table rows exactly) but I have small problem. Here is code sample var move = false; function...
5
by: Ravi | last post by:
In IE (tested IE6 on W2k&WXP) onmousemove event appears to fire continually when mouse is over the document and not moving or touched at all, even when mouse is physically detached from the...
5
by: Iouri | last post by:
I have added the Overrides proc onMouseMove like Protected Overrides Sub onMouseMove(ByVal e As System.Windows.Forms.MouseEventArgs) ........... End Sub This proc supposed to fire when I...
1
by: k.roemke | last post by:
Hello! After a longer time I want to do some javascript again. Task: set content of an iframe to the origin page if the mouse is not moved Problem: <iframe onmousemove="resetCounter();return...
15
hsriat
by: hsriat | last post by:
<body onmousemove="moveMe()"> This function can also be called as document.onmousemove = function {moveMe();}; Similarly what can be done for onmousemove="moveMe(event)" ?
1
by: EddieT | last post by:
Hi, I am planning to override the mouse movement to discrete steps so that i can get a coarser movement of the mouse for easier click of objects. However, I am not getting any trigger in the...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.