Show Image when Control has Focus

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Stanton
    New Member
    • Mar 2007
    • 6

    Show Image when Control has Focus

    How can I get an image to appear when a control has the focus in a form?

    I would assume expression builder might be useful, but whenever I try to put an expression into an event box, it tries to find the expression as a macro title and fails.

    (Also, I see Me comes up a lot in expressions, and wonder if that's why mine don't work... what does it mean??)
  • cyberdwarf
    Recognized Expert New Member
    • Nov 2006
    • 218

    #2
    Hi Stanton

    'Me' generally refers to the current form, eg, Me.Visible=True

    Let's assume your image is going to appear in an image control - Problem: an image control cannot receive focus!

    Otherwise, you will have to use a different type of control (eg, text box) and make the image visible when that control receives focus

    HTH
    Steve

    Comment

    • pks00
      Recognized Expert Contributor
      • Oct 2006
      • 280

      #3
      What control are you talking about here?

      Stuff from Steve should help.

      You can use the GotFocus event handler to show your image and LostFocus to hide your image

      Your image would be in a picture control

      Comment

      • NeoPa
        Recognized Expert Moderator MVP
        • Oct 2006
        • 32633

        #4
        Please remember to provide a meaningful Title for any threads started (Please Use Appropriate Titles for New Threads!). This helps to ensure that other members, and also the general public, will have a better chance of finding answers to any similar questions.

        MODERATOR.

        Comment

        Working...