Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,327
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Userform Image Jennifer Excel Programming 10 February 24th 06 07:44 PM
Change image in UserForm Joseph[_58_] Excel Programming 1 February 20th 06 02:54 AM
moving an image in a userform Gixxer_J_97[_2_] Excel Programming 5 May 19th 05 12:08 AM
UserForm as a Jpeg Image John[_78_] Excel Programming 7 February 19th 04 11:46 AM
Userform Image help Pete[_13_] Excel Programming 1 November 10th 03 10:26 PM


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

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

About Us

"It's about Microsoft Excel"