By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,212 Members | 1,116 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,212 IT Pros & Developers. It's quick & easy.

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

P: n/a
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
nationalinstruments.ui.xycursor 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
Share this Question
Share on Google+
4 Replies


P: n/a
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.Control, 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.itwrote in message
news:11*********************@p47g2000hsd.googlegro ups.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
nationalinstruments.ui.xycursor 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

P: n/a
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.comPLEASEschreef in bericht
news:OU**************@TK2MSFTNGP05.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.Control, 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.itwrote in message
news:11*********************@p47g2000hsd.googlegro ups.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
nationalinstruments.ui.xycursor 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

P: n/a
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.comPLEASEschreef in berichtnews:OU**************@TK2MSFTNGP05.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.Control, 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.itwrote in message
news:11*********************@p47g2000hsd.googlegro ups.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
nationalinstruments.ui.xycursor 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

P: n/a
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_newsgroups" <ro********@yahoo.comwrote in message
news:11**********************@g4g2000hsf.googlegro ups.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.comPLEASEschreef in
berichtnews:OU**************@TK2MSFTNGP05.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.Control, 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.itwrote in message
news:11*********************@p47g2000hsd.googlegr oups.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
nationalinstruments.ui.xycursor 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 discussion thread is closed

Replies have been disabled for this discussion.