|
-
Jun 20th, 2001, 03:35 AM
#1
Thread Starter
Hyperactive Member
Picture easy one
A friend of my want to make a button... but the trick is when he moves his mouse over it he want to change the picture in the picturebox...
He asked me... But I don't know how... So it is very simple I know... But all my tries are failers...
Grtz,
Bloged
-
Jun 20th, 2001, 03:58 AM
#2
Hyperactive Member
You need to do it like this:
Private Sub Command1_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
Command1.Picture = LoadPicture("C:\Program Files\Microsoft Visual Studio\Common\Graphics\Icons\Computer\Disk05.ico")
End Sub
Private Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
Command1.Picture = LoadPicture("C:\Program Files\Microsoft Visual Studio\Common\Graphics\Icons\Computer\Disk04.ico")
End Sub
One tricky thing: You need to set the property style to 1 'Graphical', you can not do this thru code, do it via the property box.
Greetings, Luc
-
Jun 20th, 2001, 04:01 AM
#3
Frenzied Member
Code:
One tricky thing: You need to set the property style to 1 'Graphical', you can not do this thru code, do it via the property box.
yep... its a read-only property
-
Jun 20th, 2001, 04:27 AM
#4
Thread Starter
Hyperactive Member
This code works for all image types?? JPG BMP etc...
Grtz,
Bloged
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
|