A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » New Users
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

HandleFocus



 
 
Thread Tools Display Modes
  #1  
Old April 25th, 2004, 01:51 PM
Mario
external usenet poster
 
Posts: n/a
Default HandleFocus

I'm new to Access!!!!

Can someone tell me how cam I put in a Form a button like those from the Webpages? I have a picture"a.gif" and when the mouse goes over this I want the picture to be changed with another "b.gif" and when clicked "c.gif", in fact, I want "b.gif" to apear over "a.gif"; something like a button with over state, and if its possible even with down state. Of course, when I click it, to open another form, but this I think I know how to do it.

Please, help me! I have a project to finish and I'm stucked on it! (

PS: Sorry for my English, I missed some of the English classes...
  #2  
Old April 25th, 2004, 07:49 PM
Ed Robichaud
external usenet poster
 
Posts: n/a
Default HandleFocus

I suggest using a line of code like: Docmd.openform "MyFormName" . Enter
it as an [event procedure] on the "on got focus" property line of your
command button. MyFormName can be a dialog/popup form that displays your
graphic.
-Ed


"Mario" wrote in message
...
I'm new to Access!!!!

Can someone tell me how cam I put in a Form a button like those from the

Webpages? I have a picture"a.gif" and when the mouse goes over this I want
the picture to be changed with another "b.gif" and when clicked "c.gif", in
fact, I want "b.gif" to apear over "a.gif"; something like a button with
over state, and if its possible even with down state. Of course, when I
click it, to open another form, but this I think I know how to do it.

Please, help me! I have a project to finish and I'm stucked on it! (

PS: Sorry for my English, I missed some of the English classes...



  #3  
Old April 25th, 2004, 09:11 PM
Mario
external usenet poster
 
Posts: n/a
Default HandleFocus

I want to use more buttons, something like a website; with a menu on the top. It works what you just told me, but its not helping me because it will open a new form. All I want ot do is to show "b.gif" while the mouse is over an object ("a.gif"). I understand you told me to make a form for each state of the button....I'll have a lot of these forms then....

I found something usefull, but don't know to adapt it....

HandleFocus(1)
""
Private Function HandleFocus(intBtn As Integer)
' This function is called when a menu option receives the focus.
' intBtn indicates which button was clicked.

Dim intOption As Integer

On Error GoTo HandleMouseOver_Err

For intOption = 1 To conNumButtons
'Show that this menu option has the focus...
If intOption = intBtn Then
Me("Option" & intOption).Visible = True
Me("OptionLabel" & intOption).FontWeight = conFontWeightBold
Me("command" & intBtn).SetFocus
'... and turn off the focus on the other options
Else
Me("Option" & intOption).Visible = False
Me("OptionLabel" & intOption).FontWeight = conFontWeightNormal
End If
Next intOption

HandleMouseOver_Exit:
Exit Function

HandleMouseOver_Err:
MsgBox "There was an error executing the command.", vbCritical
Resume HandleMouseOver_Exit

End Function
""
I copy it from an template project ( http://office.microsoft.com/template...CT010482871033 ). This is the code for the buttons from the switchboard. I think it is made with Switchboard Manager. The buttons don't have a name, are notated with 1, 2, 3,.... , 8 and from the switchboard you can personalize the name of the button.

  #4  
Old April 26th, 2004, 06:55 PM
dandgard
external usenet poster
 
Posts: n/a
Default HandleFocus


You know I have never done this, but I think that in your case what I
would do is to load all the images you want one on top of the other.
Make the first A.gif visible and the others not.

When you get a mouseover event on a.gif make it invisible and make
b.gif visible. Then when a click event is encountered on b.gif you
want to make it invisible and c.gif visible. Then once again on click
open some form.


------------------------------------------------
~~ Message posted from http://www.ExcelTip.com/
~~View and post usenet messages directly from http://www.ExcelForum.com/

  #5  
Old April 26th, 2004, 06:55 PM
dandgard
external usenet poster
 
Posts: n/a
Default HandleFocus


You know I have never done this, but I think that in your case what I
would do is to load all the images you want one on top of the other.
Make the first A.gif visible and the others not.

When you get a mouseover event on a.gif make it invisible and make
b.gif visible. Then when a click event is encountered on b.gif you
want to make it invisible and c.gif visible. Then once again on click
open some form.


------------------------------------------------
~~ Message posted from http://www.ExcelTip.com/
~~View and post usenet messages directly from http://www.ExcelForum.com/

  #6  
Old April 29th, 2004, 11:26 AM
Mario
external usenet poster
 
Posts: n/a
Default HandleFocus

10x for infos. But I have a litlle problem, how do I make the pictures visible and invisible?
I'm new to Access and I haven't got a clue how to do it .... Any help ?
plzzzzzzzzzz ....
 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 08:08 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.