glb is a global string, I want when moving mouse to a picturebox, change
border style of picturebox.
the code shown below do that but MouseLeave event fires less than a second
after MouseHover,
even without leaving the mouse pointer or moving that.
I also tried MouseEnter event instead of MouseHover, but they act same here.
Private Sub p1_MouseHover(ByVal sender As Object, ByVal e As
System.EventArgs) Handles p1.MouseLeave, p2.MouseEnter, p3.MouseEnter,
p4.MouseEnter, p5.MouseEnter, p6.MouseEnter, p7.MouseEnter, p8.MouseEnter,
p9.MouseEnter, p10.MouseEnter, p11.MouseEnter, p12.MouseEnter
sender.BorderStyle = BorderStyle.FixedSingle
glb = sender.Name
End Sub
Private Sub p1_MouseLeave(ByVal sender As Object, ByVal e As
System.EventArgs) Handles p1.MouseLeave, p2.MouseEnter, p3.MouseEnter,
p4.MouseEnter, p5.MouseEnter, p6.MouseEnter, p7.MouseEnter, p8.MouseEnter,
p9.MouseEnter, p10.MouseEnter, p11.MouseEnter, p12.MouseEnter
If glb = sender.Name Then sender.BorderStyle = BorderStyle.None
End Sub 2 2816
In your code below, p1_MouseHover and p1_MouseLeave both handles the
exact same events. Unless this is a typo in your post I'd say this is the
problem
/claes
"Saber" <saber[.AT.]oxin.ir> wrote in message
news:eM**************@TK2MSFTNGP14.phx.gbl... glb is a global string, I want when moving mouse to a picturebox, change border style of picturebox. the code shown below do that but MouseLeave event fires less than a second after MouseHover, even without leaving the mouse pointer or moving that. I also tried MouseEnter event instead of MouseHover, but they act same
here.
Private Sub p1_MouseHover(ByVal sender As Object, ByVal e As System.EventArgs) Handles p1.MouseLeave, p2.MouseEnter, p3.MouseEnter, p4.MouseEnter, p5.MouseEnter, p6.MouseEnter, p7.MouseEnter, p8.MouseEnter, p9.MouseEnter, p10.MouseEnter, p11.MouseEnter, p12.MouseEnter
sender.BorderStyle = BorderStyle.FixedSingle glb = sender.Name
End Sub
Private Sub p1_MouseLeave(ByVal sender As Object, ByVal e As System.EventArgs) Handles p1.MouseLeave, p2.MouseEnter, p3.MouseEnter, p4.MouseEnter, p5.MouseEnter, p6.MouseEnter, p7.MouseEnter, p8.MouseEnter, p9.MouseEnter, p10.MouseEnter, p11.MouseEnter, p12.MouseEnter
If glb = sender.Name Then sender.BorderStyle = BorderStyle.None
End Sub
Thanks, I've been sleepy and didn't notice that!
"Claes Bergefall" <cl*************@nospam.com> wrote in message
news:ei**************@TK2MSFTNGP12.phx.gbl... In your code below, p1_MouseHover and p1_MouseLeave both handles the exact same events. Unless this is a typo in your post I'd say this is the problem
/claes
"Saber" <saber[.AT.]oxin.ir> wrote in message news:eM**************@TK2MSFTNGP14.phx.gbl... glb is a global string, I want when moving mouse to a picturebox, change border style of picturebox. the code shown below do that but MouseLeave event fires less than a second after MouseHover, even without leaving the mouse pointer or moving that. I also tried MouseEnter event instead of MouseHover, but they act same here.
Private Sub p1_MouseHover(ByVal sender As Object, ByVal e As System.EventArgs) Handles p1.MouseLeave, p2.MouseEnter, p3.MouseEnter, p4.MouseEnter, p5.MouseEnter, p6.MouseEnter, p7.MouseEnter, p8.MouseEnter, p9.MouseEnter, p10.MouseEnter, p11.MouseEnter, p12.MouseEnter
sender.BorderStyle = BorderStyle.FixedSingle glb = sender.Name
End Sub
Private Sub p1_MouseLeave(ByVal sender As Object, ByVal e As System.EventArgs) Handles p1.MouseLeave, p2.MouseEnter, p3.MouseEnter, p4.MouseEnter, p5.MouseEnter, p6.MouseEnter, p7.MouseEnter, p8.MouseEnter, p9.MouseEnter, p10.MouseEnter, p11.MouseEnter, p12.MouseEnter
If glb = sender.Name Then sender.BorderStyle = BorderStyle.None
End Sub
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Stephen Williams |
last post by:
I am migrating a VB 6 PictureBox control to VB.NET. In VB
6, this control modified its border style during the mouse
down and up events to provide user feedback that it was
selected. Once...
|
by: jfburr |
last post by:
very simple thing (I hope)
I've got a css style sheet that starts like this:
______________
A:link {
color: cc9933;
}
|
by: nick |
last post by:
I have the following code:
<style>
#item1
{
DISPLAY: block;
BACKGROUND: url(ProjMenuImgs/ProjBtn.gif) no-repeat 0px 0px;
WIDTH: 87px;
HEIGHT: 94px;
}
#item1:hover { background-position: 0...
|
by: Yeah |
last post by:
I have a multiple choice quiz where I would like to use CSS to change the
color of the answers upon clicking them. I would like to present the right
and wrong answers up front, rather than direct...
|
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...
|
by: Mike |
last post by:
I'm trying to modify actual html content via the style sheet. I know
there is the :before and :after tags, but I'm not quite sure how to use
it and if there's another way to do it.
Here's the...
|
by: spifster |
last post by:
Hello all,
I am building a collapsable tree using Javascript with DOM in IE. In
order to make collapsed cells disappear I have been hiding the text.
The cells collapse but still leave borders...
|
by: fredd00 |
last post by:
how can i change the back color on mouse out to the color specified in
the grid view declaration
in the gridview declaration
<AlternatingRowStyle BackColor="#CECECE" />
<RowStyle...
|
by: studentofknowledge |
last post by:
hi guys
im new to javascript and need some guidence please..
im trying to display a 400x400 pixel coloured area in the middle of a webpage that stays in the middle with a browser window resize....
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
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,...
|
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...
|
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: 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...
|
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,...
|
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: 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...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
| |