473,385 Members | 1,927 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.

How To..Mouse

I have a form A with lots of control on it. I am trapping MouseHover and MouseLeave to change opacity of the form. Problem is that when I move mouse over one of the control on the form MouseLeave is fired on the form. How can I control if mouse is on any part of form or on its childcontrols then it should not fire Leave event.
Feb 22 '06 #1
2 2366
Hi Pohihihi,
you can modify your algorithm a bit to check when the mouse leaves the
form, plus look at the mouse co-ordinates to see if they lie inside or
outside the boundaries of the form. Only if you "leave" the form plus you
are really outside do you mark the form as left.

Mark Dawson
http://www.markdawson.org
"Pohihihi" wrote:
I have a form A with lots of control on it. I am trapping MouseHover and MouseLeave to change opacity of the form. Problem is that when I move mouse over one of the control on the form MouseLeave is fired on the form. How can I control if mouse is on any part of form or on its childcontrols then it should not fire Leave event

Feb 22 '06 #2
Little extra work but nice technic. Thanks.

"Mark R. Dawson" <Ma*********@discussions.microsoft.com> wrote in message
news:3A**********************************@microsof t.com...
Hi Pohihihi,
you can modify your algorithm a bit to check when the mouse leaves the
form, plus look at the mouse co-ordinates to see if they lie inside or
outside the boundaries of the form. Only if you "leave" the form plus you
are really outside do you mark the form as left.

Mark Dawson
http://www.markdawson.org
"Pohihihi" wrote:
I have a form A with lots of control on it. I am trapping MouseHover and
MouseLeave to change opacity of the form. Problem is that when I move
mouse over one of the control on the form MouseLeave is fired on the
form. How can I control if mouse is on any part of form or on its
childcontrols then it should not fire Leave event

Feb 24 '06 #3

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

Similar topics

5
by: John Champaign | last post by:
Hi all, I'm working on an educational applet for a child with special needs. He's got a bit of a trick to make my life more difficult... To interact with the applet he needs to click on...
3
by: Csaba2000 | last post by:
I have set onmousedown to change the cursor, but this setting is ignored (IE 5.5; NN 6.1 on Win 2K Pro) until the mouse is either moved or the mouse button is released. On Opera 7.01, the setting...
9
by: punkin | last post by:
I am trying to catch mouse position on the entire screen by dynamically generating mouse click event at every 100 ms. My code only works for IEs but not any Netscape or Gecko-based browsers. The...
5
by: gsb | last post by:
I track the mouse location like this code: function mousePos(e) { var p = new Object(); if(e) { p.x = e.pageX; p.y = e.pageY; } else { p.x = event.x; p.y = event.y; } ... (show) }...
3
by: red | last post by:
mouse events when the mouse is on a "child control" hi everyone; my problem: I have a userControl in this usercontrol, I have a child control (a button) when the mouse moves over the...
3
by: mitsura | last post by:
Hi, I have included a small listing. The test program opens a panel and show a bitmap. What I want is to when the mouse is over the bitmap panel, I want to trap the left mouse click. The...
1
by: Salad | last post by:
I bought a MS Standard Wireless Optical Mouse, ver 3.0 today and I have a question about it. The question is...do you leave the batteries in until they die? Does the red light stay on until the...
3
by: Emjay | last post by:
Newbie needs to know how to set the mouse position.
2
by: markszlazak | last post by:
In the following script, a control displays (black box) in each table cell once you mouse over the cell. Mouse down on the control to change the mode of the table. Drag the mouse over cells in the...
4
by: mike | last post by:
I have the opportunity to rescue a project that uses a mouse to sense the relative position of a machine. The hardware is built...just needs to be programmed. Stop snickering!!! I didn't do it...I...
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: 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
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
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
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...
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...

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.