was wondering, how do I use images as buttons? with roll over.
anybody...please.....?
Thanks..... :ehh:
Printable View
was wondering, how do I use images as buttons? with roll over.
anybody...please.....?
Thanks..... :ehh:
use a picturebox and load your picture in that... Use picturebox' properties instead...
Other wise you can use toolbar where buttons can have pictures..
Else Command buttons can have pictures on them also
HTH:o
If you want the image to act as a button then just do the following
Rollover?
VB Code:
Private Sub Image1_Click() MsgBox ("IMAGE JUST CLICKED"), vbExclamation End Sub
To use image as a button do as Laserman wrote down !
but, to create it as an rollover button, try this one :
Dim blnMouseOver as Boolean
Private Sub Form Load ()
blnMouseOver = False
End Sub
Private Sub Image1_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
If blnMouseOver Then
Image1.Picture = App.Path & strFilename 'File of another image to roll over
End Sub
I'm sorry my last post is interrupted, this is the one i want to share :
To use image as a button do as Laserman wrote down !
but, to create it as an rollover button, try this one :
VB Code:
Private Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single) Image1.Picture = LoadPicture(App.path & your_1st_image_filename) End Sub Private Sub Image1_Click() 'put the command you want to insert when the button cliked 'just like laserman ask you to do End Sub Private Sub Image1_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single) If X < Image1.Width And Y < Image1.Height Then Image1.Picture = LoadPicture(App.Path & your_2nd_rollover_imagefiles) 'File of another image to roll over End If End Sub
Hope it helps you.
Thanks a lot guys, its my third week using VB and it help a lot big time. almost got frustrated..anyway thanks.
:wave: