By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
457,967 Members | 1,172 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 457,967 IT Pros & Developers. It's quick & easy.

A97: Setting form's Picture property to another file from within VBA doesn't repaint the form with new bitmap

P: n/a
MLH
Setting form's Picture property to another file from within
VBA doesn't repaint the form with new bitmap - for instance...

Me.Picture = "c:\pics\MyNewPic.jpg"

I tried
Me.Repaint
afterward, to no avail. Ideas? Suggestions?
Feb 13 '06 #1
Share this Question
Share on Google+
4 Replies


P: n/a
MLH wrote:
Setting form's Picture property to another file from within
VBA doesn't repaint the form with new bitmap - for instance...

Me.Picture = "c:\pics\MyNewPic.jpg"

I tried
Me.Repaint
afterward, to no avail. Ideas? Suggestions?

I do this (and started it in an A97 application), but with an image
control instead of the form picture property:

Forms!frmSetUpViewMaps.imgMap.Picture = strMap

Forms!frmSetUpViewMaps.Repaint

The above image is in the footer of a continuous form and the above two
lines are fired on the on Current event.

I wonder if a form requery is required in your case? Or, if your form
is a pop up or something, use an image control instead of the form
picture property?

The other thing to check - have you set the PIcture Type property to
"linked"?

--
Tim http://www.ucs.mun.ca/~tmarshal/
^o<
/#) "Burp-beep, burp-beep, burp-beep?" - Quaker Jake
/^^ "Whatcha doin?" - Ditto "TIM-MAY!!" - Me
Feb 13 '06 #2

P: n/a
MLH
>I do this (and started it in an A97 application), but with an image
control instead of the form picture property:

Forms!frmSetUpViewMaps.imgMap.Picture = strMap

Forms!frmSetUpViewMaps.Repaint

The above image is in the footer of a continuous form and the above two
lines are fired on the on Current event.

I wonder if a form requery is required in your case? Or, if your form
is a pop up or something, use an image control instead of the form
picture property? Hmmm??? Me.Requery. Hadn't considered that. Will try.
The other thing to check - have you set the PIcture Type property to
"linked"?

Yes, changed to Linked right off the bat - was really hoping on that
one. I may try your image control suggestion. I don't want to have the
image come to the foreground though - covering up other controls.
My picture property image, of course, covers the entire form surface.

Feb 13 '06 #3

P: n/a
MLH
Requery didn't do me any good.

Its some kind-a-video thing. I put an unused textbox on the form
left 0, top 0, width 0 and height 0. After I change the forms's
picture property, I set the textbox's height & width to the form's
height and width and in the next 2 lines, reset it back to zero
for both. That somehow forces a refresh of the picture. Not my
first choice work-a-round, but may be the best of all options.

Next - how to avoid the message box announcing "Importing
c:\bitmaps\somefile.jpg". Dunno... SetWarnings False perhaps???
Feb 14 '06 #4

P: n/a
You ask so many questions you really should learn how to search GoogleGroups
effectively. It will save you hours of development time.

Here's a previous post of mine on this issue.

The one thing you must do is turn of the Loading Image dialog. If you don't,
and quickly scroll through the records in Form view, or page quickly in
Print Preview, you run the risk of crashing Access. Use the Registry mod at
the Access MVP site:
Additionally, two issues in regards to the Registry modification pointed to
here http://www.mvps.org/access/api/api0038.htm
1) The Registry key MUST be "No" NOT "no" or "NO"
2) On systems with XP or on systems with more than one user account,
you must add/modify the key in both HKEY_CURRENT_USER and
HKEY_LOCAL_MACHINE.

--

HTH
Stephen Lebans
http://www.lebans.com
Access Code, Tips and Tricks
Please respond only to the newsgroups so everyone can benefit.
"MLH" <CR**@NorthState.net> wrote in message
news:up********************************@4ax.com...
Requery didn't do me any good.

Its some kind-a-video thing. I put an unused textbox on the form
left 0, top 0, width 0 and height 0. After I change the forms's
picture property, I set the textbox's height & width to the form's
height and width and in the next 2 lines, reset it back to zero
for both. That somehow forces a refresh of the picture. Not my
first choice work-a-round, but may be the best of all options.

Next - how to avoid the message box announcing "Importing
c:\bitmaps\somefile.jpg". Dunno... SetWarnings False perhaps???

Feb 14 '06 #5

This discussion thread is closed

Replies have been disabled for this discussion.