Making Custom Buttons

Morgandy

Registered User.
Local time
Today, 01:54
Joined
Nov 29, 2008
Messages
42
Ok I have to ask. I've been using Mouse Move to create the rollover button effect. It makes my form flash and spaz out a lot. Is there a way to create a custom made button and import it in to Access? or am I stuck with MouseMove function.
 
You can just use the buttons in Access and put what ever caption you like on them and any code you want behind the on click event of the button. Is that what you are looking for?
 
I have not had that experience, even in an RDP session with XP (console), Citrix, or /Terminal Services.

I would be glad to test your code if you will to post a sample database.
 
No really. I'm already using a command button, changing it's image and then using the MouseMove function to change the picture. I think all the code for the rollovers is making the program twitch. I was thinking if there is a way to import a premade button-something that has the code compacted or something it would speed the program up and stop twiching.
 
Just a way to eliminate the flashing. Every time I move the mouse a little bit all the rollovers twitch or flash as if getting ready to be pressed. It's livable but distracting. I've been told it's related to the MouseMove function. /shrug. Just looking for alternative I guess. Boss wanted the graphics to be rollover.
 
Just a way to eliminate the flashing. Every time I move the mouse a little bit all the rollovers twitch or flash as if getting ready to be pressed. It's livable but distracting. I've been told it's related to the MouseMove function. /shrug. Just looking for alternative I guess. Boss wanted the graphics to be rollover.

I may be able to help, but I do need to see what you are doing.

Can you post a sample of a form doing what you are describing?
 
Well here is the code. Messier then all get out but I'm just now learning VB so getting scraps from here and there.

Private Sub Form_Load()
'Lock All Data Controls except SearchBox
Dim ctl As Control
For Each ctl In Me.Controls
If ctl.Name <> "SearchBox" Then
If TypeOf ctl Is TextBox Or TypeOf ctl Is ComboBox Or TypeOf ctl Is ListBox _
Or TypeOf ctl Is CheckBox Then
ctl.Enabled = False
ctl.Locked = True
End If
End If
Next ctl
End Sub

Private Sub SearchButton_Click()
Dim rs As Object

If Not IsNull(Me.SearchBox) Then
Set rs = Me.Recordset.Clone
rs.FindFirst "[StudentID] = '" & Me![SearchBox] & "'"

If Not rs.EOF Then Me.Bookmark = rs.Bookmark

If rs.NoMatch Then MsgBox "No Match Found!"
Else
MsgBox "You Must Enter An ID Number Before Searching!"
End If
End Sub
Private Sub Detail_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
button1.Picture = "C:\Users\Morgandy\Desktop\SASHA\images\ButtonUpLeft.gif"
button2.Picture = "C:\Users\Morgandy\Desktop\SASHA\images\ButtonUpLeft.gif"
button3.Picture = "C:\Users\Morgandy\Desktop\SASHA\images\ButtonUpLeft.gif"
button6.Picture = "C:\Users\Morgandy\Desktop\SASHA\images\ButtonUpRight.gif"
button7.Picture = "C:\Users\Morgandy\Desktop\SASHA\images\ButtonUpRight.gif"
button8.Picture = "C:\Users\Morgandy\Desktop\SASHA\images\ButtonUpRight.gif"
button9.Picture = "C:\Users\Morgandy\Desktop\SASHA\images\BottomButtonUpLeft.gif"
button10.Picture = "C:\Users\Morgandy\Desktop\SASHA\images\BottomButtonUpLeft.gif"
Button11.Picture = "C:\Users\Morgandy\Desktop\SASHA\images\BottomButtonUpRight.gif"
button12.Picture = "C:\Users\Morgandy\Desktop\SASHA\images\BottomButtonUpRight.gif"
information.Picture = "C:\Users\Morgandy\Desktop\SASHA\images\infoUp.gif"
check.Picture = "C:\Users\Morgandy\Desktop\SASHA\images\checkUp.gif"
hourGlass.Picture = "C:\Users\Morgandy\Desktop\SASHA\images\hourglassUp.gif"
mail.Picture = "C:\Users\Morgandy\Desktop\SASHA\images\mailUp.gif"
saveFile.Picture = "C:\Users\Morgandy\Desktop\SASHA\images\saveUp.gif"
logoLink.Picture = "C:\Users\Morgandy\Desktop\SASHA\images\logoUp.jpg"
menuLast.Picture = "C:\Users\Morgandy\Desktop\SASHA\images\menuLastUp.gif"
menuFirst.Picture = "C:\Users\Morgandy\Desktop\SASHA\images\menuFirstUp.gif"
menuNext.Picture = "C:\Users\Morgandy\Desktop\SASHA\images\menuNextUp.gif"
menuPrevious.Picture = "C:\Users\Morgandy\Desktop\SASHA\images\menuPreviousUp.gif"
menuFind.Picture = "C:\Users\Morgandy\Desktop\SASHA\images\menuSearchUp.gif"
SearchButton.Picture = "C:\Users\Morgandy\Desktop\SASHA\images\searchButtonUp.gif"
End Sub

Private Sub button1_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
button1.Picture = "C:\Users\Morgandy\Desktop\SASHA\images\ButtonDownLeft.gif"
End Sub

Private Sub button1_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
button1.Picture = "C:\Users\Morgandy\Desktop\SASHA\images\ButtonOverLeft.gif"
End Sub

Private Sub button10_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
button10.Picture = "C:\Users\Morgandy\Desktop\SASHA\images\BottomButtonDownLeft.gif"
End Sub

Private Sub button10_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
button10.Picture = "C:\Users\Morgandy\Desktop\SASHA\images\BottomButtonOverLeft.gif"
End Sub

Private Sub Button11_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
Button11.Picture = "C:\Users\Morgandy\Desktop\SASHA\images\BottomButtonDownRight.gif"
End Sub

Private Sub button11_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
Button11.Picture = "C:\Users\Morgandy\Desktop\SASHA\images\BottomButtonOverRight.gif"
End Sub

Private Sub button12_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
button12.Picture = "C:\Users\Morgandy\Desktop\SASHA\images\BottomButtonDownRight.gif"
End Sub

Private Sub button12_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
button12.Picture = "C:\Users\Morgandy\Desktop\SASHA\images\BottomButtonOverRight.gif"
End Sub

Private Sub button2_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
button2.Picture = "C:\Users\Morgandy\Desktop\SASHA\images\ButtonDownLeft.gif"
End Sub

Private Sub button2_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
button2.Picture = "C:\Users\Morgandy\Desktop\SASHA\images\ButtonOverLeft.gif"
End Sub

Private Sub button3_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
button3.Picture = "C:\Users\Morgandy\Desktop\SASHA\images\ButtonDownLeft.gif"
End Sub

Private Sub button3_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
button3.Picture = "C:\Users\Morgandy\Desktop\SASHA\images\ButtonOverLeft.gif"
End Sub
Private Sub button4_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
button4.Picture = "C:\Users\Morgandy\Desktop\SASHA\images\ButtonDownLeft.gif"
End Sub
Private Sub button4_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
button4.Picture = "C:\Users\Morgandy\Desktop\SASHA\images\ButtonOverLeft.gif"
End Sub

Private Sub Button5_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
Button5.Picture = "C:\Users\Morgandy\Desktop\SASHA\images\ButtonDownRight.gif"
End Sub

Private Sub button5_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
Button5.Picture = "C:\Users\Morgandy\Desktop\SASHA\images\ButtonOverRight.gif"
End Sub

Private Sub button6_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
button6.Picture = "C:\Users\Morgandy\Desktop\SASHA\images\ButtonDownRight.gif"
End Sub

Private Sub button6_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
button6.Picture = "C:\Users\Morgandy\Desktop\SASHA\images\ButtonOverRight.gif"
End Sub

Private Sub button7_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
button7.Picture = "C:\Users\Morgandy\Desktop\SASHA\images\ButtonDownRight.gif"
End Sub

Private Sub button7_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
button7.Picture = "C:\Users\Morgandy\Desktop\SASHA\images\ButtonOverRight.gif"
End Sub

Private Sub button8_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
button8.Picture = "C:\Users\Morgandy\Desktop\SASHA\images\ButtonDownRight.gif"
End Sub

Private Sub button8_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
button8.Picture = "C:\Users\Morgandy\Desktop\SASHA\images\ButtonOverRight.gif"
End Sub

Private Sub button9_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
button9.Picture = "C:\Users\Morgandy\Desktop\SASHA\images\BottomButtonDownLeft.gif"
End Sub

Private Sub button9_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
button9.Picture = "C:\Users\Morgandy\Desktop\SASHA\images\BottomButtonOverLeft.gif"
End Sub

Private Sub check_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
check.Picture = "C:\Users\Morgandy\Desktop\SASHA\images\checkDown.gif"
End Sub

Private Sub check_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
check.Picture = "C:\Users\Morgandy\Desktop\SASHA\images\checkOver.gif"
End Sub



Private Sub hourGlass_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
hourGlass.Picture = "C:\Users\Morgandy\Desktop\SASHA\images\hourglassDown.gif"
End Sub

Private Sub hourGlass_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
hourGlass.Picture = "C:\Users\Morgandy\Desktop\SASHA\images\hourglassOver.gif"
End Sub

Private Sub information_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
information.Picture = "C:\Users\Morgandy\Desktop\SASHA\images\infoDown.gif"
End Sub

Private Sub information_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
information.Picture = "C:\Users\Morgandy\Desktop\SASHA\images\infoOver.gif"
End Sub

Private Sub logoLink_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
logoLink.Picture = "C:\Users\Morgandy\Desktop\SASHA\images\logoDown.jpg"
End Sub

Private Sub logoLink_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
logoLink.Picture = "C:\Users\Morgandy\Desktop\SASHA\images\logoOver.jpg"
End Sub

Private Sub mail_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
mail.Picture = "C:\Users\Morgandy\Desktop\SASHA\images\mailDown.gif"
End Sub

Private Sub mail_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
mail.Picture = "C:\Users\Morgandy\Desktop\SASHA\images\mailOver.gif"
End Sub

Private Sub menuFind_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
menuFind.Picture = "C:\Users\Morgandy\Desktop\SASHA\images\menuSearchDown.gif"
End Sub

Private Sub menuFind_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
menuFind.Picture = "C:\Users\Morgandy\Desktop\SASHA\images\menuSearchOver.gif"
End Sub

Private Sub menuFirst_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
menuFirst.Picture = "C:\Users\Morgandy\Desktop\SASHA\images\menuFirstDown.gif"
End Sub

Private Sub menuFirst_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
menuFirst.Picture = "C:\Users\Morgandy\Desktop\SASHA\images\menuFirstOver.gif"
End Sub

Private Sub menuLast_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
menuLast.Picture = "C:\Users\Morgandy\Desktop\SASHA\images\menuLastDown.gif"
End Sub

Private Sub menuLast_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
menuLast.Picture = "C:\Users\Morgandy\Desktop\SASHA\images\menuLastOver.gif"
End Sub

Private Sub menuNext_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
menuNext.Picture = "C:\Users\Morgandy\Desktop\SASHA\images\menuNextDown.gif"
End Sub

Private Sub menuNext_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
menuNext.Picture = "C:\Users\Morgandy\Desktop\SASHA\images\menuNextOver.gif"
End Sub

Private Sub menuPrevious_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
menuPrevious.Picture = "C:\Users\Morgandy\Desktop\SASHA\images\menuPreviousDown.gif"
End Sub

Private Sub menuPrevious_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
menuPrevious.Picture = "C:\Users\Morgandy\Desktop\SASHA\images\menuPreviousOver.gif"
End Sub

Private Sub saveFile_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
saveFile.Picture = "C:\Users\Morgandy\Desktop\SASHA\images\saveDown.gif"
End Sub

Private Sub saveFile_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
saveFile.Picture = "C:\Users\Morgandy\Desktop\SASHA\images\saveOver.gif"
End Sub



Private Sub SearchButton_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
SearchButton.Picture = "C:\Users\Morgandy\Desktop\SASHA\images\searchButtonDown.gif"
End Sub

Private Sub SearchButton_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
SearchButton.Picture = "C:\Users\Morgandy\Desktop\SASHA\images\searchButtonOver.gif"
End Sub
 
This may be helpful:

BrightSideOfLife

This is something I've been noodling around with. It a database based on a web template with mouseover effects, a colored "tab control" that let's you set the tabs/page titles in code, a logon with a timeout after 15 minutes of idle time (forcing a user to logon again) and more.

Candace Tripp

Note: you will have to log on to the forum to get the attachment link so that you can download the databases.
 
I've tried out several of her examples. They are good but I can never get them to work since I run 2007 and don't know enough about programing to make the adjustment. Like reading through one of your examples: I don't understand where the file is grabbing the image I want. The only file was the database, however it still did rollovers, which is what I want. but how...hehe
 
I've tried out several of her examples. They are good but I can never get them to work since I run 2007 and don't know enough about programing to make the adjustment. Like reading through one of your examples: I don't understand where the file is grabbing the image I want. The only file was the database, however it still did rollovers, which is what I want. but how...hehe

They should work fine in 2007. I have run them in 2007. Have you made sure they are in a trusted location.
 

Users who are viewing this thread

Back
Top Bottom