|
-
May 14th, 2004, 04:35 AM
#1
Thread Starter
New Member
how to use images as buttons?
was wondering, how do I use images as buttons? with roll over.
anybody...please.....?
Thanks.....
-
May 14th, 2004, 04:44 AM
#2
Fanatic Member
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
-
May 14th, 2004, 04:44 AM
#3
Fanatic Member
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
-
May 14th, 2004, 04:55 AM
#4
Member
Try this one !!
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
-
May 14th, 2004, 05:22 AM
#5
Member
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.
-
May 17th, 2004, 03:55 AM
#6
Thread Starter
New Member
Thanks a lot....
Thanks a lot guys, its my third week using VB and it help a lot big time. almost got frustrated..anyway thanks.
study......study...study......study.....
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
|