473,399 Members | 3,038 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,399 software developers and data experts.

Is mouse cursor over the control?

I have this control that has no MouseEnter or MouseLeave events. How
could I find out whether the mouse cursor is over that control or not?
Is there an equivalent to the WindowFromPoint API function available
in VB.NET?

Regards,
Blaz Ziherl
bl*********@abraxas.si
Nov 20 '05 #1
3 7515
"Blaz Ziherl" <bl*********@abraxas.si> schrieb
I have this control that has no MouseEnter or MouseLeave events.
Don't all Controls have these events?
How could I find out whether the mouse cursor is over that control or
not? Is there an equivalent to the WindowFromPoint API function
available in VB.NET?


System.Windows.Forms.Control.PointToClient
System.Windows.Forms.Control.PointToScreen
--
Armin

How to quote and why:
http://www.plig.net/nnq/nquote.html
http://www.netmeister.org/news/learn2quote.html

Nov 20 '05 #2
* bl*********@abraxas.si (Blaz Ziherl) scripsit:
I have this control that has no MouseEnter or MouseLeave events. How
could I find out whether the mouse cursor is over that control or not?
Is there an equivalent to the WindowFromPoint API function available
in VB.NET?


Are you sure you don't have these events? From which base class does
your control inherit?

BTW: You can get the cursor's position using 'Cursor.Position' and then
using the controls' 'PointToClient' (and 'PointToScreen') methods to get
control coordinates.

--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>
Nov 20 '05 #3
Thanks for your help. I have solved the problem with the PointToClient method.

Thanks,
Blaz Ziherl
bl*********@abraxas.si
Nov 20 '05 #4

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

Similar topics

1
by: Tee | last post by:
Hi, From my main form, I am executing another application using System.Diagnostics.Process.Start. The application has its own window displaying when the applicaiton is run. I want to change...
3
by: larry mckay | last post by:
does anyone have a code sample that changes the mouse cursor to an hourglass or waitcursor ? *** Sent via Developersdex http://www.developersdex.com *** Don't just participate in...
2
by: Darrell Wesley | last post by:
When I place a Tab control on a form with one or more TabPages and click inside one of the pages and then click on a tab the mouse cursor gets trapped inside the tab control until I click on...
2
by: Sam | last post by:
Hi, I can't figure out how to detect when my mouse cursor leaves a panel control. It should not trigger the event (or do anything) when the mouse leave the panel but still is over a control that...
6
by: Andrea V.F. | last post by:
How can I determine the control under the mouse cursor when a user muves the mouse?? For example if the user moves the cursor over a textbox i would receive the name of that textbox without using...
8
by: **Developer** | last post by:
Open some dialog boxes and the mouse cursor moves to one of the dialog buttons. I'd like to implement that . Is that simply something I have to program, i.e. figure out where I want the cursor...
3
by: Wayne Wengert | last post by:
In VB.NET is there a way to set the mouse cursor to the Wait cursor that will stay in effect across several forms? For example, I want to set the cursor to the WaitCursor in formA just before it...
0
by: haegens | last post by:
I am making a .NET Application which has a TreeView Control in it. I have 3 levels of nodes. The toplevel is a rootnode which contains all other nodes. The second level holds one kind of nodes that...
0
by: Studlyami | last post by:
I am trying to find how windows translate the input from a HID device to an actual windows message; specifically, the mouse. I am trying to figure out how when the mouse moves the process windows...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
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...
0
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,...
0
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...

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.