LoadPicture fails

K

kirkm

Hi,

I have an image control on a Form and load the pictures with
the command:

Form1.img1.Picture = LoadPicture(MyPicture)

A click on the form correctly assigns the
next picture filename (and Path) to MyPicture and you see each picture
in succession.

However, if the image is clicked on, the next picture(s) isn't shown.
The code still executes, with all the correct parameters for MyPicture
but the LoadPicture instruction just seems to be ignored. I can step
through and see this, and it occurs every time.

There's no click event (or anything else) coded for the img1 control.

Anyone know what's happening here? !!

Thanks - Kirk
 
K

kirkm

after loading the picture do

Me.Repaint

Regards,
Peter T

Thanks for the suggestion, Peter. I ttried that
and also a 'full path'
frmOne.img1.Picture.Repaint

.... but neither make any difference. It does
seem odd. I'm going to make a new workbook
with just that routine by itself. Maybe you
could run that and see what you get? Perhaps I'm
making a mistake somehow that's causing the glitch.

Cheers - Kirk
 
K

kirkm

after loading the picture do

Me.Repaint

Regards,
Peter T

Peter, you're quite right - thank you.

Originally I could get this to work but it does now!

Cheers - Kirk
 

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