|
-
Nov 15th, 2000, 11:31 AM
#1
Thread Starter
Hyperactive Member
Hello everybody
My mouse cursor turns to a hand over my form. I was just wondering if it was possible to change the mouse cursor again - to another hand, a clenched fist - when the mouse button is pressed over my form.
How would I do this?
It would just be a nice touch like I've seen in other programs - the hand sort of closes its fingers and drags the form around the screen.
Thanks for any help!
-
Nov 15th, 2000, 11:43 AM
#2
Fanatic Member
Use the Form's Mouse Down event.
Cheers,
Paul
P.S. Do not forget to use MouseUp to change it back again...
Not nearly so tired now...
Haven't been around much so be gentle...
-
Nov 15th, 2000, 11:54 AM
#3
Thread Starter
Hyperactive Member
Thanks,
I had an idea it would be like that but...what am I doing wrong?
Private Sub Form_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
Form1.mouseIcon = "c:\windows\desktop\H_move.cur"
End Sub
I get a 'type mismatch' error
Thanks.
-
Nov 15th, 2000, 11:58 AM
#4
Fanatic Member
Errr... Dunno, have you tried MousePointer?
Paul.
Not nearly so tired now...
Haven't been around much so be gentle...
-
Nov 15th, 2000, 12:01 PM
#5
transcendental analytic
Mouseicon is a stdpicture, not a string, therefore you get the type mismatch, well i think you just forgot to use loadpicture 
Form1.mouseIcon = Loadpicture("c:\windows\desktop\H_move.cur")
Set mousepointer to 99, and the icon shows up.
Use  
writing software in C++ is like driving rivets into steel beam with a toothpick.
writing haskell makes your life easier:
reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.
-
Nov 15th, 2000, 12:32 PM
#6
Thread Starter
Hyperactive Member
This works:
Private Sub Form_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
Form1.MouseIcon = LoadPicture("c:\windows\desktop\H_move.cur")
End Sub
Private Sub Form_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
Form1.MouseIcon = LoadPicture("c:\windows\desktop\H_arrow.cur")
End Sub
But the above means that the user has to have those cursors on their desktop. Is there anyway to include them in my exe or something?
-
Nov 15th, 2000, 01:10 PM
#7
transcendental analytic
place the cursor inside a control property, like picturebox or image. or use a imagelist and it will be compiled with the exe.
Use  
writing software in C++ is like driving rivets into steel beam with a toothpick.
writing haskell makes your life easier:
reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.
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
|