|
-
Jun 17th, 2008, 04:59 PM
#1
Thread Starter
Addicted Member
[RESOLVED] Mouseover
I have picures for my buttons. "cmdbutton" property has a picture. So first how do I make it so when i move my mouse over the button i get the little popup that tells you what the button is. Like for a send button, when I move the mouse over it it show a bubble that says "send mail". with like a second delay.
also how do i make is so that when the mouse is over the button, the cursor will change?
-
Jun 17th, 2008, 05:53 PM
#2
Hyperactive Member
Re: Mouseover
The first part, I belive you want a ToolTip, to do that you just change the picture/button's property "ToolTipText" to whatever you want, and it will popup after a second or so of hovering over it.
For the cursor change, buttons and pictures also have the"MouseIcon" and "MousePointer" properties you can set, so when the mouse is over it, the cursor changes to whatever you specify in the property.
-
Jun 17th, 2008, 10:15 PM
#3
Thread Starter
Addicted Member
-
Jun 17th, 2008, 11:15 PM
#4
Thread Starter
Addicted Member
Re: [RESOLVED] Mouseover
Ok actually a set the mpuse pointer properties to custom and the mouse icon properties to the icon I wanted and rean and compiled the program and it doesnt work. Nothing happens. However the tool tip thing worked great.
-
Jun 18th, 2008, 02:18 AM
#5
Hyperactive Member
Re: [RESOLVED] Mouseover
Hmmm, i tested and setting the Mousepointer to 99 (custom) and loading the proper .ico file into the MouseIcon property at design time, it works fine for me.
-
Jun 18th, 2008, 09:02 AM
#6
Thread Starter
Addicted Member
Re: [RESOLVED] Mouseover
ok so you said:
loading the proper .ico file into the MouseIcon property at design time, it works fine for me
What is a "proper" Icon? because i did a .ico search and just loaded one from my comp.
-
Jun 18th, 2008, 10:12 AM
#7
Hyperactive Member
Re: [RESOLVED] Mouseover
i loaded a 32x32 ico file, when i said proper i just meant the one that I wanted. I cant understand why it wont work for you
-
Jun 20th, 2008, 02:24 AM
#8
Thread Starter
Addicted Member
Re: [RESOLVED] Mouseover
where did you get your icons from?
-
Jun 20th, 2008, 08:56 AM
#9
Re: [RESOLVED] Mouseover
Try something like this
Code:
Option Explicit
Private Declare Function SetCapture Lib "user32" (ByVal hwnd As Long) As Long
Private Declare Function ReleaseCapture Lib "user32" () As Long
Private Declare Function GetCapture Lib "user32" () As Long
Private Sub Command1_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
If (X < 0) Or (Y < 0) Or (X > Command1.Width) Or (Y > Command1.Height) Then
ReleaseCapture
Command1.MousePointer = 0 'default
ElseIf GetCapture() <> Command1.hwnd Then
SetCapture Command1.hwnd
Command1.MousePointer = 6 'size ne sw
End If
End Sub
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
|