473,748 Members | 4,178 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to add mousemove event to a control that doesn't have it

Hello everybody,
I hope you can help me with my problem. I want to add the mousemove
event to a class that doesn't have it (specifically it is the
nationalinstrum ents.ui.xycurso r from measurement studio but I can't
find nothing about the possibility to do it.
Can anybody help me? I'm using VB.net 2003

Thank you very very much
Maurizio

Jun 7 '07 #1
4 2019
You can add event as any other user-defined event - see MSDN or VS help for
examples how to do that, for example

http://msdn2.microsoft.com/en-us/library/5z57dxz2.aspx

As about actual implementation, if your object is subclass of
Windows.Forms.C ontrol, take a look at OnPreview methods at
http://msdn2.microsoft.com/en-us/lib...l_members.aspx
You can override those to implement required functionality

HTH
Alex

<in**@nirox.itw rote in message
news:11******** *************@p 47g2000hsd.goog legroups.com...
Hello everybody,
I hope you can help me with my problem. I want to add the mousemove
event to a class that doesn't have it (specifically it is the
nationalinstrum ents.ui.xycurso r from measurement studio but I can't
find nothing about the possibility to do it.
Can anybody help me? I'm using VB.net 2003

Thank you very very much
Maurizio


Jun 7 '07 #2
Alex,

I get more the idea that the OP wants to add mouse functionality to a sealed
class. In my eyes impossible however you never know.

Cor

"AlexS" <sa***********@ SPAMrogers.comP LEASEschreef in bericht
news:OU******** ******@TK2MSFTN GP05.phx.gbl...
You can add event as any other user-defined event - see MSDN or VS help
for examples how to do that, for example

http://msdn2.microsoft.com/en-us/library/5z57dxz2.aspx

As about actual implementation, if your object is subclass of
Windows.Forms.C ontrol, take a look at OnPreview methods at
http://msdn2.microsoft.com/en-us/lib...l_members.aspx
You can override those to implement required functionality

HTH
Alex

<in**@nirox.itw rote in message
news:11******** *************@p 47g2000hsd.goog legroups.com...
>Hello everybody,
I hope you can help me with my problem. I want to add the mousemove
event to a class that doesn't have it (specifically it is the
nationalinstru ments.ui.xycurs or from measurement studio but I can't
find nothing about the possibility to do it.
Can anybody help me? I'm using VB.net 2003

Thank you very very much
Maurizio



Jun 7 '07 #3
On Jun 7, 1:52 pm, "Cor Ligthert [MVP]" <notmyfirstn... @planet.nl>
wrote:
Alex,

I get more the idea that the OP wants to add mouse functionality to a sealed
class. In my eyes impossible however you never know.

Cor

"AlexS" <salexru200...@ SPAMrogers.comP LEASEschreef in berichtnews:OU* *************@T K2MSFTNGP05.phx .gbl...
You can add event as any other user-defined event - see MSDN or VS help
for examples how to do that, for example
http://msdn2.microsoft.com/en-us/library/5z57dxz2.aspx
As about actual implementation, if your object is subclass of
Windows.Forms.C ontrol, take a look at OnPreview methods at
http://msdn2.microsoft.com/en-us/lib....controls.cont...
You can override those to implement required functionality
HTH
Alex
<i...@nirox.itw rote in message
news:11******** *************@p 47g2000hsd.goog legroups.com...
Hello everybody,
I hope you can help me with my problem. I want to add the mousemove
event to a class that doesn't have it (specifically it is the
nationalinstrum ents.ui.xycurso r from measurement studio but I can't
find nothing about the possibility to do it.
Can anybody help me? I'm using VB.net 2003
Thank you very very much
Maurizio
I don't have VS handy so I can't check, but does a user control's
mousemove event get raised when the mouse moves over one of it's child
controls?

Thanks,

Seth Rowe

Jun 7 '07 #4
If class is sealed, probably it is possible to use it as component/member in
control derived class. More fuss with client area and mouse capture maybe,
but probably possible. Don't know if worth the effort, though

I am not familiar with specific class mentioned.

"rowe_newsgroup s" <ro********@yah oo.comwrote in message
news:11******** **************@ g4g2000hsf.goog legroups.com...
On Jun 7, 1:52 pm, "Cor Ligthert [MVP]" <notmyfirstn... @planet.nl>
wrote:
>Alex,

I get more the idea that the OP wants to add mouse functionality to a
sealed
class. In my eyes impossible however you never know.

Cor

"AlexS" <salexru200...@ SPAMrogers.comP LEASEschreef in
berichtnews:OU **************@ TK2MSFTNGP05.ph x.gbl...
You can add event as any other user-defined event - see MSDN or VS help
for examples how to do that, for example
>http://msdn2.microsoft.com/en-us/library/5z57dxz2.aspx
As about actual implementation, if your object is subclass of
Windows.Forms.C ontrol, take a look at OnPreview methods at
http://msdn2.microsoft.com/en-us/lib....controls.cont...
You can override those to implement required functionality
HTH
Alex
<i...@nirox.itw rote in message
news:11******* **************@ p47g2000hsd.goo glegroups.com.. .
Hello everybody,
I hope you can help me with my problem. I want to add the mousemove
event to a class that doesn't have it (specifically it is the
nationalinstru ments.ui.xycurs or from measurement studio but I can't
find nothing about the possibility to do it.
Can anybody help me? I'm using VB.net 2003
>Thank you very very much
Maurizio

I don't have VS handy so I can't check, but does a user control's
mousemove event get raised when the mouse moves over one of it's child
controls?

Thanks,

Seth Rowe


Jun 7 '07 #5

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

Similar topics

0
1586
by: Tim Mulholland | last post by:
I have written some code that causes mouseover effects on a picture box. The code works fine most of the time and creates some really nice effects. HOWEVER, If i try, i can get the effects to not disappear (as if the MouseLeave event isn't firing) or i can get the effects to not appear in the first place (as if the MouseEnter/MouseMove events aren't firing). More or less i can do this by just moving the mouse slowly into the picturebox...
3
7433
by: Tim Mulholland | last post by:
i posted this a while ago and never got a response, but i'm still having problems, so i thought i'd see if anyone had any sudden realizations this time Thanks in advance! Tim I have written some code that causes mouseover effects on a picture box. The code works fine most of the time and creates some really nice effects.
3
5668
by: Crucifix | last post by:
Hello, I'm writing a small C# app, and part of what I'm trying to do involves the dragging of PictureBox controls on a form. Unfortunately, MouseMove seems to be behaving very oddly, causing spurious MouseMove events when the cursor doesn't actually move. I've looked for a solution in the groups, and although I've come close, I haven't found a proper explanation or fix. Here is a rundown, followed by a very simple test app that...
5
4901
by: BrianW | last post by:
I am working on a program that has multiple picturebox controls that a user is allowed to move around which are contained within a panel control for visual placement. In my mousedown event, I set the picturebox control's borderstyle to Fixed3D, but upon doing so, I am not able to track the picturebox control through mousemove events (if you move the mouse off of the control too quickly, the control no longer receives mouse events). If I...
2
1913
by: Kruno | last post by:
Hi, I need to close main win form after some time inactivity. Users mostly do the work only with the mouse. It's possible to handle mouse move event on application level? Because I don't like to write next statement for each control like Handles MyBase.MouseMove,handles control.mousemove etc. After some time of the mouse inactivity (maybe 15 minutes) application
3
5156
by: TyBreaker | last post by:
I'm writing a screen saver using Visual Studio 2005 (Basic) and I have a Form which contains a PictureBox. I have two events, Click and MouseMove that I'd like to cause the program to end (see below) as one would expect from a screen saver. Well my Click event fires but for some reason my MouseMove event does not. Both the Form and the PictureBox are enabled. In my Form_Load routine, I tried placing "Me.Capture = true" which...
1
2276
by: Dave | last post by:
I have a listview control in a form, and I use the mousemove event (to set a tooltip). This worked fine in VS2003, but when I ported it to VS2005 I found that when the mouse hovers over a populated row in the listview the mousemove event fires continuously - but not when it hovers over an empty part of the listview. I have duplicated this in a small test program to prove that it's nothing odd in my software. I don't know if it happens with...
0
43793
missinglinq
by: missinglinq | last post by:
Having been asked, for the umpteenth time, how to use the MouseMove property to change the appearance of an object, I put together this short tutorial and sample database today. Perhaps it will be of use to some of you. The MouseMove Event is used to trigger an action when the user moves the mouse cursor over an object such as a textbox, label or command button. This can be applied to a number of routines. The attached zip file,...
0
8987
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8826
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9534
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
9316
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8239
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6793
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6073
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4597
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
3303
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

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.