Turning off Loading Image message in VBA

A

aehchua

Hi,

I'd like to know how to turn off the message "Loading <imagename>" when
you set the picture property of an image to a new picture.

I teach an introductory IT class to non-IT students. I'm trying to get
the students to appreciate what programming is like without burdening
them with variable assignments and declarations, etc.

To do so, I wrote a little program called "coffee machine." Students
are supposed to write a program to get the coffee machine to give
customers what they want. The coffee machine has cups, water, coffee,
milk, and sugar. Customers ask for their coffee with/without sugar. A
sensor on a conveyor belt goes to the five dispensers (i.e., cups etc.)
to check for availability and get the requisite item.

The whole thing is implemented in a graphical interface. The problem
is that every time I've got a new customer, or the sensor moves to
another station, I'll get a message like "Loading
c:\db\pictures\person1.gif" or "Loading c:\db\pictures\sensor.gif."
The message only lasts for a microsecond. However, given the rate at
which the sensor moves, the messages continuously block the screen.

How do I turn such messages off? DoCmd.SetWarnings=False doesn't work.

Cecil Chua
 
D

Dirk Goldgar

Hi,

I'd like to know how to turn off the message "Loading <imagename>"
when you set the picture property of an image to a new picture.

I teach an introductory IT class to non-IT students. I'm trying to
get the students to appreciate what programming is like without
burdening them with variable assignments and declarations, etc.

To do so, I wrote a little program called "coffee machine." Students
are supposed to write a program to get the coffee machine to give
customers what they want. The coffee machine has cups, water, coffee,
milk, and sugar. Customers ask for their coffee with/without sugar.
A sensor on a conveyor belt goes to the five dispensers (i.e., cups
etc.) to check for availability and get the requisite item.

The whole thing is implemented in a graphical interface. The problem
is that every time I've got a new customer, or the sensor moves to
another station, I'll get a message like "Loading
c:\db\pictures\person1.gif" or "Loading c:\db\pictures\sensor.gif."
The message only lasts for a microsecond. However, given the rate at
which the sensor moves, the messages continuously block the screen.

How do I turn such messages off? DoCmd.SetWarnings=False doesn't
work.

Cecil Chua

See this link:

http://www.mvps.org/access/api/api0038.htm
API: Suppress the "Loading Image" dialog

If you take the registry approach, I think you have to modify a
different key for each file type: JPEG, GIF, etc.
 
K

Ken Snell [MVP]

Another way to "minimize" this occurrence is to always use a .bmp image and
not a compressed one (.gif, .jpg, etc.).
 
A

aehchua

Ken said:
Another way to "minimize" this occurrence is to always use a .bmp image and
not a compressed one (.gif, .jpg, etc.).

Thanks. This worked.

FYI, the one involving DLL calls didn't work, because the images load
quite quickly. Basically, they quit before timeout gets called.
Disabling the gif option didn't work either (even after I rebooted the
machine). I only have gifs (no photographs, only line art)

Cecil Chua
 
D

Dirk Goldgar

Thanks. This worked.

FYI, the one involving DLL calls didn't work, because the images load
quite quickly. Basically, they quit before timeout gets called.
Disabling the gif option didn't work either (even after I rebooted the
machine). I only have gifs (no photographs, only line art)

If by "disabling the gif option" you mean setting the registry key as
directed in that article I posted, I'm puzzled as to why it didn't work,
as it has always worked before. However, so long as you found a
workable solution, we're all happy.
 
S

Stephen Lebans

The OP is not changing the correct key or is not changing the value
correctly.

1) The Registry Key value must be "No" not "no".

2) It depends how you are logged on to WinXP. I think if you have no other
accounts setup on your machine and log on as Administrator then you can
simply add the required Reg Key to:
HKEY_LOCAL_MACHINE\Software\Microsoft\ Shared Tools\Graphics
Filters\Import\JPEG\Options
Remember you have to add the Key for each Image type you will be displaying
in the Image control.

If you have multiple acounts then you have to add the Reg Key to each
seperate account or HKEY_CURRENT_USER. Something like that but I honestly
don't remember for sure off the top of my head.

--

HTH
Stephen Lebans
http://www.lebans.com
Access Code, Tips and Tricks
Please respond only to the newsgroups so everyone can benefit.
 
D

Dirk Goldgar

Stephen Lebans said:
The OP is not changing the correct key or is not changing the value
correctly.

1) The Registry Key value must be "No" not "no".

2) It depends how you are logged on to WinXP. I think if you have no
other accounts setup on your machine and log on as Administrator then
you can simply add the required Reg Key to:
HKEY_LOCAL_MACHINE\Software\Microsoft\ Shared Tools\Graphics
Filters\Import\JPEG\Options
Remember you have to add the Key for each Image type you will be
displaying in the Image control.

If you have multiple acounts then you have to add the Reg Key to each
seperate account or HKEY_CURRENT_USER. Something like that but I
honestly don't remember for sure off the top of my head.

Thanks for the clarification, Stephen.
 
A

aehchua

This is probably it. I'm running this off of a "school" machine
(although it is my personal office machine).

In any case, the code I'm writing will eventually be used for a
classroom activity. Given various awkwardnesses (e.g., having to
change registry keys in n classrooms), the solution wasn't practically
feasible.

Cecil Chua
 
S

Stephen Lebans

Just add code to your application install routine that modifies the
necessary registry keys.

--

HTH
Stephen Lebans
http://www.lebans.com
Access Code, Tips and Tricks
Please respond only to the newsgroups so everyone can benefit.
 

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

Similar Threads

E-mail access 7

Top