-
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
-
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
-
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 :)
-
This code works for all image types?? JPG BMP etc...
Grtz,
Bloged