Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Refresh image on userform
I have created a userform to manage a simple database. On the userform is an
image control which shows a (small) picture from the current record. As I scroll through the database, the image changes happily. So far so good. I have now added a click event to the image which loads the current record picture into a second image control which is contained on a large, but currently invisible, frame. I then make the frame visible, which gives the illusion of showing a larger version of the original picture. This larger image has a click event which simply sets the frame's visible property to false, hiding the image and returning the user to the original form. Again, all works well. Now for the problem... the first image control with the small picture (on line 2 above!) no longer updates as I continue to scroll through the data. If I click the image again, the correct 'blow-up' appears, but the small image does not refresh. I tried an alternative approach using a second user form to show the enlarged pcture but still the same problem. Can anyone suggest a remedy (aside from using Access!!)? Thanks -- Graham |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Refresh image on userform
Hi Graham
Without the possibility to test your setup, this is the general cure for things like that: DoEvents Me.Repaint DoEvents HTH. Best wishes Harald "Graham S" skrev i melding ... I have created a userform to manage a simple database. On the userform is an image control which shows a (small) picture from the current record. As I scroll through the database, the image changes happily. So far so good. I have now added a click event to the image which loads the current record picture into a second image control which is contained on a large, but currently invisible, frame. I then make the frame visible, which gives the illusion of showing a larger version of the original picture. This larger image has a click event which simply sets the frame's visible property to false, hiding the image and returning the user to the original form. Again, all works well. Now for the problem... the first image control with the small picture (on line 2 above!) no longer updates as I continue to scroll through the data. If I click the image again, the correct 'blow-up' appears, but the small image does not refresh. I tried an alternative approach using a second user form to show the enlarged pcture but still the same problem. Can anyone suggest a remedy (aside from using Access!!)? Thanks -- Graham |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Refresh image on userform
Your suggestion worked. I'd tried the DoEvents but on its own that wasn't
enough. The Repaint was not obvious but did the trick. Many thanks. -- Graham "Harald Staff" wrote: Hi Graham Without the possibility to test your setup, this is the general cure for things like that: DoEvents Me.Repaint DoEvents HTH. Best wishes Harald "Graham S" skrev i melding ... I have created a userform to manage a simple database. On the userform is an image control which shows a (small) picture from the current record. As I scroll through the database, the image changes happily. So far so good. I have now added a click event to the image which loads the current record picture into a second image control which is contained on a large, but currently invisible, frame. I then make the frame visible, which gives the illusion of showing a larger version of the original picture. This larger image has a click event which simply sets the frame's visible property to false, hiding the image and returning the user to the original form. Again, all works well. Now for the problem... the first image control with the small picture (on line 2 above!) no longer updates as I continue to scroll through the data. If I click the image again, the correct 'blow-up' appears, but the small image does not refresh. I tried an alternative approach using a second user form to show the enlarged pcture but still the same problem. Can anyone suggest a remedy (aside from using Access!!)? Thanks -- Graham |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Userform Image | Excel Programming | |||
Change image in UserForm | Excel Programming | |||
moving an image in a userform | Excel Programming | |||
UserForm as a Jpeg Image | Excel Programming | |||
Userform Image help | Excel Programming |