Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Picture Loading Annoyance

Status
Not open for further replies.

tomco22

Technical User
Sep 16, 2000
74
0
0
US
On my Switchboard form the timer event cycles through random pictures every 5 seconds. Every time a new picture cycles, a vbCancel message box briefly appears that says:
Code:
Importing     C\Documents and Settings\...\  \...jpg
Is there any way to keep this annoying message box from appearing?

Tom
 
You can tamper with the registry, apparently. If you change

HKEY_LOCAL_MACHINE\Software\Microsoft\Shared
Tools\GraphicsFilters\Import\JPEG\Options
ShowProgressDialog

to No, it is supposed to stop the flicker.


 
how are ya tomco22 . . .

Post the code in your [blue]On Timer[/blue] event! . . .

Calvin.gif
See Ya! . . . . . .
 
Thank you for your response Remou. I was afraid someone was going to bring up the registry. Because of security settings at work I don’t think I can make registry changes to my or the various user’s machines.

Hey TheAceMan1. I had the code in a Sub called Picturizer(). The timer event called that sub. I tried moving the code to the On Timer event but I still get the message box flicker.


Tom
 
Tomco,

Aceman means post your code in this forum - we'll be better able to assist if we can have a look at your VB proedure(s).

Ed Metcalfe.

Please do not feed the trolls.....
 
I have a solution:

If you convert your JPEG files to bitmaps then the message box doesn't appear. The file sizes are going to be a fair bit larger than their JPEG equivalents it's a quick and easy solution.

Ed Metcalfe.

Please do not feed the trolls.....
 
Ed2020,
I’ll try converting the jpg’s to bitmaps. File size is not really a problem. I’ll have to figure out some way to automate the bitmap conversion because I have 1000 pictures to randomly cycle through.
Thanks

Code:
Private Sub PicturiZER()
Dim strPatH As String
Dim intP As Integer

Randomize    ' Initialize random-number generator.

intP = Int((1000 * Rnd) + 1)    ' Generate random value between 1 and 1000.

    strPatH = "C:\Documents and Settings\Container Ships\ship_"
    strPatH = strPatH & intP
    strPatH = strPatH & ".jpg"
    Me.Pic.Picture = strPatH

End Sub

Tom
 
tomco22 . . .

I just realized what your seeing is the graphic import progressbar. This is what [blue]Remou's[/blue] registry tweak is all about. [purple]Unfortunately there's no other way to subside the progressbar other than thru the registry![/purple] and [purple]changing file formats won't help.[/purple] In fact a tweak needs to be made for each graphic file type you intend to use.

As an example the following is a [blue].reg[/blue] file run on my machine to take care of several file types:
Code:
[blue]REGEDIT4

[HKEY_LOCAL_MACHINE\Software\Microsoft\Shared Tools\Graphics Filters\Import\BMP\Options]
"ShowProgressDialog"="No"

[HKEY_LOCAL_MACHINE\Software\Microsoft\Shared Tools\Graphics Filters\Import\GIF\Options]
"ShowProgressDialog"="No"

[HKEY_LOCAL_MACHINE\Software\Microsoft\Shared Tools\Graphics Filters\Import\JPEG\Options]
"ShowProgressDialog"="No"

[HKEY_LOCAL_MACHINE\Software\Microsoft\Shared Tools\Graphics Filters\Import\TIFF\Options]
"ShowProgressDialog"="No"[/blue]

[blue]Note: Although they have to be done locally, the tweaks in no way interfer with security![/blue]

Calvin.gif
See Ya! . . . . . .
 
TheAceMan1,
Is there any way to run:

Code:
[HKEY_LOCAL_MACHINE\Software\Microsoft\Shared Tools\Graphics Filters\Import\JPEG\Options]
"ShowProgressDialog"="No"

from Visual Basic?

Tom
 
AceMan,

Changing the files to bitmaps on my PC has got rid of the progress bar.

Have checked my registry and the BMP key you quote (HKEY_LOCAL_MACHINE\Software\Microsoft\Shared Tools\Graphics Filters\Import\BMP\Options) doesn't exist. Googling on it doesn't return anything either - Googling the others you list does.

Ed Metcalfe.

Please do not feed the trolls.....
 
Sure is! . . . I gave it in my prior post but you didn't realize [thumbsup2]

[ol][li]Open [blue]NotePad[/blue] and copy/paste the following:
Code:
[blue]REGEDIT4

[HKEY_LOCAL_MACHINE\Software\Microsoft\Shared Tools\Graphics Filters\Import\[purple][b]BMP[/b][/purple]\Options]
"ShowProgressDialog"="No"

[HKEY_LOCAL_MACHINE\Software\Microsoft\Shared Tools\Graphics Filters\Import\[purple][b]GIF[/b][/purple]\Options]
"ShowProgressDialog"="No"

[HKEY_LOCAL_MACHINE\Software\Microsoft\Shared Tools\Graphics Filters\Import\[purple][b]JPEG[/b][/purple]\Options]
"ShowProgressDialog"="No"

[HKEY_LOCAL_MACHINE\Software\Microsoft\Shared Tools\Graphics Filters\Import\[purple][b]TIFF[/b][/purple]\Options]
"ShowProgressDialog"="No"[/blue]
[/li]
[li]Add/remove lines for the file types you wish.[/li]
[li]Save & Name the file: [purple]NameYouChooseHere[/purple].reg, then close NotePad ([blue]remember where you saved the file[/blue]).[/li]
[li]Open [blue]Windows Explorer[/blue] and navigate to the file.[/li]
[li][blue]Right-Click[/blue] the file and select [purple]merge[/purple].[/li][/ol]

If permissions prevent editing the registry then someone with permissions can do it.

[blue]Thats It! . . . Cheers! . . . [/blue]

Calvin.gif
See Ya! . . . . . .
 
Ed2020 . . .

Then [blue]ShowProgressDialog[/blue] for .bmp is somehow set to No!

Curious this . . . take a look at the registry and let me know how its set! . . .

Calvin.gif
See Ya! . . . . . .
 
ShowProgressDialog isn't set to anything for BMP as the HKEY_LOCAL_MACHINE\Software\Microsoft\Shared Tools\Graphics Filters\Import\BMP key doesn't exist in my registry at all. Presumably the value defaults to no if the key isn't found.

I have no idea why the key doesn't appear in my registry (nor does it appear in my laptop's registry), but if the machines Tom is using are the same then converting the files to bitmaps would work...

Ed Metcalfe.

Please do not feed the trolls.....
 
AceMan,

Are you using Office 2000?

Ed Metcalfe.

Please do not feed the trolls.....
 
Ed2020 . . .

From my prsonal testing in the past, no entry defaults to No for access.

Here at home I 2k and 2003 (different machines) . . . 2k defaulted to no entries before I made the change.

Calvin.gif
See Ya! . . . . . .
 
Ed2020 . . .

Woops . . . 2k & 2003 defaulted to yes!

Calvin.gif
See Ya! . . . . . .
 
Very odd.

I have Office 2003 on both machines. I've double checked and the registry key for BMP graphics filter definitely doesn't exist (have to double check 'cos it's 4:20am here and my brain isn't working too well!).

Have also double checked running the code in Access and the progress dialog box is definitely not displaying.

I also have no BMP graphics filters under "C:\Program Files\Common Files\Microsoft Shared\GRPHFLT\"

Ed Metcalfe.

Please do not feed the trolls.....
 
My theory, for what it's worth:

Office 2000 requires a separate graphics filter for bitmap files. Office 2003 doesn't.

At some point your PC with Office 2003 has had Office 2000 on it. The bitmap graphics filter has been left behind after removal of Office 2000.

My PC has only had Office 2003 on it, hence no BMP graphics filter and corresponding registry keys.

If the keys are there Access will make use of the data stored there. If not then the return value is taken as "No".

So providing Tom's PCs have a clean Office 2003 installation, with no Office 2000 remnants, my original suggestion should work. If not then he will have to look at making the necessary reg changes you have detailed.

As I said in my last post though it's daft o'clock in the morning so this theory could well be utter nonsense. :)

Ed Metcalfe.


Please do not feed the trolls.....
 
Ed2020 . . .

My 2003 is on a seperate machine and I've logged in my library that I had to make the registry change for jpeg but did the the same for the other types using the .reg file. So I can't say for bitmap [sad]

In any case (mind you . . . I'm not trying to dispell your advice but intergrate it with my own) if it is set the .reg file is another way to take care of it!

Calvin.gif
See Ya! . . . . . .
 
Well, to wrap all this up:

1- I can add a key to the registry. It works great on my machine but I’ll have to see if I have rights at work. I have less than 10 users so even if I need a system administrator it is doable.

2-I can use .bmp files instead of .jpg files and automatically get no flicker. I actually found a cool little program on the web that will convert all 1000 photos at once. There is a problem though. My .bmp photos look great when I look at them in PhotoDraw but on the Access form they are grainy and ugly.

Thanks for all your help!

Tom
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top