|
-
Sep 22nd, 2012, 01:05 AM
#1
Thread Starter
Addicted Member
"Hover effect" using picture box control?
Guys, a little help here? I'm trying to make an application that has "button hover" effects, similar to the ones that you normally see in the web. This is how I coded mine:
Code:
Public Class frmModeSelect
Private Sub pcbUserKiosk_MouseHover(ByVal sender As Object, ByVal e As System.EventArgs) Handles pcbUserKiosk.MouseHover
pcbUserKiosk.BackgroundImage = My.Resources.glow_cat
End Sub
Private Sub pcbUserKiosk_MouseLeave(ByVal sender As Object, ByVal e As System.EventArgs) Handles pcbUserKiosk.MouseLeave
pcbUserKiosk.BackgroundImage = Nothing
End Sub
End Class
pcbUserKiosk by the way is a PictureBox control. You can say that my application is image-heavy, but I really, really want to do this. Anyway, the hover image displays just fine when you hover over the control, but there seems to be a one second lag time. I was wondering how I can eliminate this lag time when the user hovers over the control. What I did, you see, is that there is a background image on the background of the form, and there are a bunch of PictureBoxes on top of the "buttons" in the background image, that would load the hover image. Is this the right way to do it?
Another thing, how can I "reposition" or show which part of an image is shown in the PictureBox control (kindly refer to the second attachment). To better illustrate it, I want the hover and normal states of the "button" in one PNG image, and I want to "reposition"/move the position of the image to the x & y coordinates of the hover state in that image when the user hovers over the control. And can anyone also point me to threads that teach how to skin a form? As usual, thanks.
Last edited by riechan; Sep 22nd, 2012 at 06:06 AM.
====================
ほんとにどもありがとう!
Rie Ishida
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|