[AccessD] JPEG Progress Dialog (was: The Annoying Flash - Redux)

Gustav Brock gustav at cactus.dk
Mon Aug 2 07:57:12 CDT 2004


Hi all

I had to deal with this last week, and it seems to be a Windows XP
thing:

If run under Windows XP, the relevant section is HKEY_CURRENT_USER
while under earlier Windows versions it is HKEY_LOCAL_MACHINE.

/gustav


> Hi Rocky et all

> (resume: The Annoying Flash is the Windows progress bar which pops in
> front when you assign a JPEG file to a picture control in Access; when
> the picture is small, you won't see any "bar" but only a flash of
> "something", thus no bar at all is preferable).

> Recently, I noticed this as well but under some different conditions:
> A97 on WinXP where A2000 and Access XP are installed as well.

> It seems that the key to change is not (at least in some cases) the
> one found under HKEY_LOCAL_MACHINE (as the code below assumes) but the
> equivalent key under HKEY_CURRENT_USER.

> Perhaps the only safe way for your app is to change both keys. It
> shouldn't do any harm. However, I've adjusted my code to change it
> when needed and then set it back when the user closes the form where
> pictures are selected. This is not foolproof, I know, but it has
> caused no problems yet.

> /gustav


>> Hi Rocky,

>> I have used the registry setting in code in an ADP (A2K) I am currently
>> working on and it worked fine.  There was no initial change, however the
>> progress box now does not appear.  I assume it was either due to a system
>> restart or the compacting of the app...  I'm not sure.  But it does work.

>> Regards,

>> Matt Pickering
>> LUPO DATA CONCEPTS LTD
>> http://www.lupo.net.nz


>> -----Original Message-----
>> From: AccessD-owner at databaseadvisors.com
>> [mailto:AccessD-owner at databaseadvisors.com]On Behalf Of Rocky Smolin -
>> Beach Access Software
>> Sent: Sunday, December 16, 2001 7:44 PM
>> To: AccessD at databaseadvisors.com
>> Cc: Gordon Bennett
>> Subject: RE: [AccessD] The Annoying Flash - Redux


>> Gustav et al:

>> Here's a mystery.  That code which suppresses the annoying flash works in an
>> A97 mdb but not in an A2K mdb.  Even if you don't use the code but manually
>> change the key to No, the progress bar flash still shows when setting the
>> picture property in the image box to a jpg file.  Convert the A2K mdb to A97
>> and the progress bar goes away.  So it's not in the code which changes the
>> registry key.  There's something about A2K which apparently is showing the
>> progress bar despite the reg key setting.

>> Any ideas on what's going on here?

>> TIA and regards,

>> Rocky Smolin
>> Beach Access Software

>> -----Original Message-----
>> From: AccessD-owner at databaseadvisors.com
>> [mailto:AccessD-owner at databaseadvisors.com]On Behalf Of Rocky Smolin -
>> Beach Access Software
>> Sent: Friday, December 07, 2001 9:52 PM
>> To: AccessD at databaseadvisors.com
>> Subject: RE: [AccessD] The Annoying Flash


>> Gustav:

>> That worked perfectly. Thank you.  Solves a small but annoying problem which
>> will definitely improve the quality of my products.

>> Best regards,

>> Rocky


>> -----Original Message-----
>> From: AccessD-owner at databaseadvisors.com
>> [mailto:AccessD-owner at databaseadvisors.com]On Behalf Of Gustav Brock
>> Sent: Friday, December 07, 2001 12:28 PM
>> To: AccessD at databaseadvisors.com
>> Subject: Re: [AccessD] The Annoying Flash


>> Hi Rocky (and Seth)

>> Did some digging and found a short API routine from April last year by
>> Albert van Bergen (left the list I believe). I brushed it a bit.

>> Copy and paste this into a new module for testing (beware of line
>> breaks):

>> <code>

>> Option Compare Database
>> Option Explicit

>> Public Const HKEY_LOCAL_MACHINE = &H80000002

>> Public Const REG_SZ = 1

>> Public Declare Function RegCloseKey Lib "advapi32.dll" ( _
>>   ByVal hKey As Long) As Long

>> Public Declare Function RegCreateKey Lib "advapi32.dll" _
>>   Alias "RegCreateKeyA" ( _
>>   ByVal hKey As Long, _
>>   ByVal lpSubKey As String, _
>>   ByRef phkResult As Long) As Long

>> Public Declare Function RegSetValueEx Lib "advapi32.dll" _
>>   Alias "RegSetValueExA" ( _
>>   ByVal hKey As Long, _
>>   ByVal lpValueName As String, _
>>   ByVal Reserved As Long, _
>>   ByVal dwType As Long, _
>>   ByRef lpData As Any, _
>>   ByVal cbData As Long) As Long

>> Public Sub WriteRegistry( _
>>   hKey As Long, _
>>   PathVar As String, _
>>   ValueVar As String, _
>>   DataVar As String)

>>   Dim hCurKey As Long
>>   Dim Result  As Long

>>   Result = RegCreateKey(hKey, PathVar, hCurKey)
>>   Result = RegSetValueEx(hCurKey, ValueVar, 0, REG_SZ, ByVal DataVar,
>> Len(DataVar))
>>   Result = RegCloseKey(hCurKey)

>> End Sub

>> Public Sub ShowJpegProgressDialog(ByVal booShow As Boolean)

>>   Dim PathVar   As String
>>   Dim ValueVar  As String
>>   Dim DataVar   As String

>>   PathVar = "Software\Microsoft\Shared Tools\Graphics
>> Filters\Import\JPEG\Options"
>>   ValueVar = "ShowProgressDialog"
>>   DataVar = IIf(booShow = True, "Yes", "No")

>>   Call WriteRegistry(HKEY_LOCAL_MACHINE, PathVar, ValueVar, DataVar)

>> End Sub

>> </code>




More information about the AccessD mailing list