Overlapping images

J

Jonathan Blitz

I need to define two overlapping images on a form. The lower one is
partially visible. I want to be able to move the lower one to the front when
it is clicked on. How do I change which image is the front one?

--
Jonathan Blitz
AnyKey Limited
Israel

"When things seem bad
Don't worry and shout
Just count up the times
Things have worked themselves out."
 
E

Edward P Sager

Try this code, which will cause the lower one to come to the top with a
single click and will return the upper one to its original position when you
double-click the lower one:

Option Compare Database

Private Sub Image1_Click()
'Image1 is the lower image and Image2 is the upper image
Me.Image1.Visible = True
Me.Image2.Visible = False
End Sub

Private Sub Image1_DblClick(Cancel As Integer)
Me.Image2.Visible = True
End Sub

edsager
 
J

Jonathan Blitz

Problem is that this makes the other image invisible.

What I have are two playing cards sitting one on tehr other with the top one
set down and to the right slightly from the top one so that part of the
lower one is visible under the top one.
I need them to be reversed when the lower one is clicked so that it becomes
fully visible without the other one disappearing.

One posibility I thought of was to place another image of the underneath
card over the top and make it invisible. I could then make it
visible/invisible as required. This will work but is not so tidy.
--
Jonathan Blitz
AnyKey Limited
Israel

"When things seem bad
Don't worry and shout
Just count up the times
Things have worked themselves out."
 
J

John Spencer (MVP)

UNTESTED suggestion.

How about using -

DoCmd.RunCommand acCmdBringToFront

If I recall correctly that should bring the control that has the focus to the front.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top