On Mouse Move the mouse pointer fick when using Image

V

Victor Torres

Hi to all!!! I'm almost finishing my super nice switchboard that include
round edge, custom image button and the best thing is that no more change
button in the switchboard. When you click a button that have sub-buttons all
the rest of the buttons scroll down and the sub-buttons appear and then if
you click another of the mothers buttons the button scroll back up and all
the sub-buttons disappear. Plus I add a very nice hover effect with
different images. I had been working with this switchboard for about a week
now with a lot of codes and changes. Now to the point, since my buttons are
image, when I use hover the mouse over them using the on mouse move the mouse
icon flick. The screen doesn't flick just the mouse.
I try using the same procedure without the image just with color blocks and
it doesn't do the flick. I think that this is because is loading the image.
But is there anything else that I can do to accomplish this??? I know that
what I did is a lot considering my knowledge. I don't know a lot about vb.
But if someone out there can help me with this switchboard I will be happy.
By the way as soon as I finish this switchboard I will post it so anybody can
use it or customize it. Sorry for my English. My nature language is Spanish.
 
J

Jeanette Cunningham

Hi Victor,
your english is very good.
One thing that often works is to put a transparent command button over each
image and in code reference the command button instead of the image.
Transparent buttons work just like normal buttons - their transparency makes
them invisible.

Jeanette Cunningham MS Access MVP -- Melbourne Victoria Australia
 
M

Marshall Barton

Victor said:
Hi to all!!! I'm almost finishing my super nice switchboard that include
round edge, custom image button and the best thing is that no more change
button in the switchboard. When you click a button that have sub-buttons all
the rest of the buttons scroll down and the sub-buttons appear and then if
you click another of the mothers buttons the button scroll back up and all
the sub-buttons disappear. Plus I add a very nice hover effect with
different images. I had been working with this switchboard for about a week
now with a lot of codes and changes. Now to the point, since my buttons are
image, when I use hover the mouse over them using the on mouse move the mouse
icon flick. The screen doesn't flick just the mouse.
I try using the same procedure without the image just with color blocks and
it doesn't do the flick. I think that this is because is loading the image.
But is there anything else that I can do to accomplish this??? I know that
what I did is a lot considering my knowledge. I don't know a lot about vb.
But if someone out there can help me with this switchboard I will be happy.
By the way as soon as I finish this switchboard I will post it so anybody can
use it or customize it. Sorry for my English. My nature language is Spanish.


Does your hover code check to see if the image was already
done and skip resetting the image?
 
V

Victor Torres

That is exactly what I did. My problem is that using an image to represent a
round edge button when I use the On Mouse Move Event to create the effect of
Hover the mouse icon flick a lot, not the screen. Today I manage to finish
almost the whole switchboard and it look awesome except for one thing. The
flick in the mouse. Thanks.
 
V

Victor Torres

That is a very nice observation. Can you please code an example to
accomplish that?
 
V

Victor Torres

Here is part of the code that I use to do this. Thanks.

For intOption = 1 To conNumButtons2


'Show that this menu option has the focus...

If intOption = (intBtn - 10) Then
If Me.Text20 <> intOption + 10 Then
Me("Button1" & intOption).Picture = _
"C:\Program Files\Cyber Hospicio\Flat Button1.png"
End If
'... and turn off the focus on the other options
Else
If Me.Text20 <> intOption + 10 Then
Me("Button1" & intOption).Picture = _
"C:\Program Files\Cyber Hospicio\Flat Button0.png"
End If
End If
Next intOption
 
V

Victor Torres

I did it!!!!!! Thanks a lot. I add an if to the formula to check if the
name was the same and bingo!!! here is the code that I create.

For intOption = 1 To conNumButtons2
'Show that this menu option has the focus...

If intOption = (intBtn - 10) Then
If Me.Text20 <> intOption + 10 Then
If Me("Button1" & intOption).Picture = _
"C:\Program Files\Cyber Hospicio\Flat Button1.png" Then
Else
Me("Button1" & intOption).Picture = _
"C:\Program Files\Cyber Hospicio\Flat Button1.png"
End If
End If
'... and turn off the focus on the other options
Else
If Me.Text20 <> intOption + 10 Then
If Me("Button1" & intOption).Picture = _
"C:\Program Files\Cyber Hospicio\Flat Button0.png" Then
Else
Me("Button1" & intOption).Picture = _
"C:\Program Files\Cyber Hospicio\Flat Button0.png"
End If
End If
End If
Next intOption
 
M

Marshall Barton

Wow! Fixed in only 15 minutes including 3 posts to the
newsgroup, nice work.

My only other comment is that I don't like empty Then blocks
so I would use <> instead of =
 
V

Victor Torres

That's right. Thanks. Would you like a copy of it so you could evaluate it?
Plus if you have any comments or how to make it better you could let me
know. The link to the switchboard is:

http://www.vtronixcorp.com/download/test.zip

Marshall Barton said:
Wow! Fixed in only 15 minutes including 3 posts to the
newsgroup, nice work.

My only other comment is that I don't like empty Then blocks
so I would use <> instead of =
--
Marsh
MVP [MS Access]


Victor said:
I did it!!!!!! Thanks a lot. I add an if to the formula to check if the
name was the same and bingo!!! here is the code that I create.

For intOption = 1 To conNumButtons2
'Show that this menu option has the focus...

If intOption = (intBtn - 10) Then
If Me.Text20 <> intOption + 10 Then
If Me("Button1" & intOption).Picture = _
"C:\Program Files\Cyber Hospicio\Flat Button1.png" Then
Else
Me("Button1" & intOption).Picture = _
"C:\Program Files\Cyber Hospicio\Flat Button1.png"
End If
End If
'... and turn off the focus on the other options
Else
If Me.Text20 <> intOption + 10 Then
If Me("Button1" & intOption).Picture = _
"C:\Program Files\Cyber Hospicio\Flat Button0.png" Then
Else
Me("Button1" & intOption).Picture = _
"C:\Program Files\Cyber Hospicio\Flat Button0.png"
End If
End If
End If
Next intOption
 
V

Victor Torres

you will have to unzip this file in the drive C:\ so the end file must be
inside C:\New Switchboard\ because of the images. I don't know if there is a
better way so the programs know the location of the mdb and look for the
image inside its location.

Victor Torres said:
That's right. Thanks. Would you like a copy of it so you could evaluate it?
Plus if you have any comments or how to make it better you could let me
know. The link to the switchboard is:

http://www.vtronixcorp.com/download/test.zip

Marshall Barton said:
Wow! Fixed in only 15 minutes including 3 posts to the
newsgroup, nice work.

My only other comment is that I don't like empty Then blocks
so I would use <> instead of =
--
Marsh
MVP [MS Access]


Victor said:
I did it!!!!!! Thanks a lot. I add an if to the formula to check if the
name was the same and bingo!!! here is the code that I create.

For intOption = 1 To conNumButtons2
'Show that this menu option has the focus...

If intOption = (intBtn - 10) Then
If Me.Text20 <> intOption + 10 Then
If Me("Button1" & intOption).Picture = _
"C:\Program Files\Cyber Hospicio\Flat Button1.png" Then
Else
Me("Button1" & intOption).Picture = _
"C:\Program Files\Cyber Hospicio\Flat Button1.png"
End If
End If
'... and turn off the focus on the other options
Else
If Me.Text20 <> intOption + 10 Then
If Me("Button1" & intOption).Picture = _
"C:\Program Files\Cyber Hospicio\Flat Button0.png" Then
Else
Me("Button1" & intOption).Picture = _
"C:\Program Files\Cyber Hospicio\Flat Button0.png"
End If
End If
End If
Next intOption

:

Victor Torres wrote:

Hi to all!!! I'm almost finishing my super nice switchboard that include
round edge, custom image button and the best thing is that no more change
button in the switchboard. When you click a button that have sub-buttons all
the rest of the buttons scroll down and the sub-buttons appear and then if
you click another of the mothers buttons the button scroll back up and all
the sub-buttons disappear. Plus I add a very nice hover effect with
different images. I had been working with this switchboard for about a week
now with a lot of codes and changes. Now to the point, since my buttons are
image, when I use hover the mouse over them using the on mouse move the mouse
icon flick. The screen doesn't flick just the mouse.
I try using the same procedure without the image just with color blocks and
it doesn't do the flick. I think that this is because is loading the image.
But is there anything else that I can do to accomplish this??? I know that
what I did is a lot considering my knowledge. I don't know a lot about vb.
But if someone out there can help me with this switchboard I will be happy.
By the way as soon as I finish this switchboard I will post it so anybody can
use it or customize it. Sorry for my English. My nature language is Spanish.


Does your hover code check to see if the image was already
done and skip resetting the image?
 
M

Marshall Barton

I don't put anything except system/office type files on my C
drive.

If you have the image files in the same directory as the
front end mdb file, you can get the path via
CurrentProject.Path

Me("Button1" & intOption).Picture = _
CurrentProject.Path & "\Flat Button1.png"

If you can do that in your situation, then I think you
should be able to do it all with a single Edit - Replace on
the entire code project. After that I will take a look at
it.
--
Marsh
MVP [MS Access]

Victor said:
you will have to unzip this file in the drive C:\ so the end file must be
inside C:\New Switchboard\ because of the images. I don't know if there is a
better way so the programs know the location of the mdb and look for the
image inside its location.

Victor Torres said:
That's right. Thanks. Would you like a copy of it so you could evaluate it?
Plus if you have any comments or how to make it better you could let me
know. The link to the switchboard is:

http://www.vtronixcorp.com/download/test.zip

Marshall Barton said:
Wow! Fixed in only 15 minutes including 3 posts to the
newsgroup, nice work.

My only other comment is that I don't like empty Then blocks
so I would use <> instead of =
--
Marsh
MVP [MS Access]


Victor Torres wrote:

I did it!!!!!! Thanks a lot. I add an if to the formula to check if the
name was the same and bingo!!! here is the code that I create.

For intOption = 1 To conNumButtons2
'Show that this menu option has the focus...

If intOption = (intBtn - 10) Then
If Me.Text20 <> intOption + 10 Then
If Me("Button1" & intOption).Picture = _
"C:\Program Files\Cyber Hospicio\Flat Button1.png" Then
Else
Me("Button1" & intOption).Picture = _
"C:\Program Files\Cyber Hospicio\Flat Button1.png"
End If
End If
'... and turn off the focus on the other options
Else
If Me.Text20 <> intOption + 10 Then
If Me("Button1" & intOption).Picture = _
"C:\Program Files\Cyber Hospicio\Flat Button0.png" Then
Else
Me("Button1" & intOption).Picture = _
"C:\Program Files\Cyber Hospicio\Flat Button0.png"
End If
End If
End If
Next intOption

:

Victor Torres wrote:

Hi to all!!! I'm almost finishing my super nice switchboard that include
round edge, custom image button and the best thing is that no more change
button in the switchboard. When you click a button that have sub-buttons all
the rest of the buttons scroll down and the sub-buttons appear and then if
you click another of the mothers buttons the button scroll back up and all
the sub-buttons disappear. Plus I add a very nice hover effect with
different images. I had been working with this switchboard for about a week
now with a lot of codes and changes. Now to the point, since my buttons are
image, when I use hover the mouse over them using the on mouse move the mouse
icon flick. The screen doesn't flick just the mouse.
I try using the same procedure without the image just with color blocks and
it doesn't do the flick. I think that this is because is loading the image.
But is there anything else that I can do to accomplish this??? I know that
what I did is a lot considering my knowledge. I don't know a lot about vb.
But if someone out there can help me with this switchboard I will be happy.
By the way as soon as I finish this switchboard I will post it so anybody can
use it or customize it. Sorry for my English. My nature language is Spanish.


Does your hover code check to see if the image was already
done and skip resetting the image?
 
V

Victor Torres

Done... fix the location of the image using the code that you give me.
Thanks a lot. here is the link to the switchboard.

www.vtronixcorp.com/download/newswitchboard.zip

Marshall Barton said:
I don't put anything except system/office type files on my C
drive.

If you have the image files in the same directory as the
front end mdb file, you can get the path via
CurrentProject.Path

Me("Button1" & intOption).Picture = _
CurrentProject.Path & "\Flat Button1.png"

If you can do that in your situation, then I think you
should be able to do it all with a single Edit - Replace on
the entire code project. After that I will take a look at
it.
--
Marsh
MVP [MS Access]

Victor said:
you will have to unzip this file in the drive C:\ so the end file must be
inside C:\New Switchboard\ because of the images. I don't know if there is a
better way so the programs know the location of the mdb and look for the
image inside its location.

Victor Torres said:
That's right. Thanks. Would you like a copy of it so you could evaluate it?
Plus if you have any comments or how to make it better you could let me
know. The link to the switchboard is:

http://www.vtronixcorp.com/download/test.zip

:

Wow! Fixed in only 15 minutes including 3 posts to the
newsgroup, nice work.

My only other comment is that I don't like empty Then blocks
so I would use <> instead of =
--
Marsh
MVP [MS Access]


Victor Torres wrote:

I did it!!!!!! Thanks a lot. I add an if to the formula to check if the
name was the same and bingo!!! here is the code that I create.

For intOption = 1 To conNumButtons2
'Show that this menu option has the focus...

If intOption = (intBtn - 10) Then
If Me.Text20 <> intOption + 10 Then
If Me("Button1" & intOption).Picture = _
"C:\Program Files\Cyber Hospicio\Flat Button1.png" Then
Else
Me("Button1" & intOption).Picture = _
"C:\Program Files\Cyber Hospicio\Flat Button1.png"
End If
End If
'... and turn off the focus on the other options
Else
If Me.Text20 <> intOption + 10 Then
If Me("Button1" & intOption).Picture = _
"C:\Program Files\Cyber Hospicio\Flat Button0.png" Then
Else
Me("Button1" & intOption).Picture = _
"C:\Program Files\Cyber Hospicio\Flat Button0.png"
End If
End If
End If
Next intOption

:

Victor Torres wrote:

Hi to all!!! I'm almost finishing my super nice switchboard that include
round edge, custom image button and the best thing is that no more change
button in the switchboard. When you click a button that have sub-buttons all
the rest of the buttons scroll down and the sub-buttons appear and then if
you click another of the mothers buttons the button scroll back up and all
the sub-buttons disappear. Plus I add a very nice hover effect with
different images. I had been working with this switchboard for about a week
now with a lot of codes and changes. Now to the point, since my buttons are
image, when I use hover the mouse over them using the on mouse move the mouse
icon flick. The screen doesn't flick just the mouse.
I try using the same procedure without the image just with color blocks and
it doesn't do the flick. I think that this is because is loading the image.
But is there anything else that I can do to accomplish this??? I know that
what I did is a lot considering my knowledge. I don't know a lot about vb.
But if someone out there can help me with this switchboard I will be happy.
By the way as soon as I finish this switchboard I will post it so anybody can
use it or customize it. Sorry for my English. My nature language is Spanish.


Does your hover code check to see if the image was already
done and skip resetting the image?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top