------------------------------------------------------------------------------------------------------------------------------
[ENHANCED] VFP 9.0 FIX - SAVE SOME CHANGES FOR THE MAIN VISUAL FOXPRO WINDOW WHEN THE DISPLAY RESOLUTION HAS CHANGED
January 2026
------------------------------------------------------------------------------------------------------------------------------
CCB
1. BUG:
In VFP Advanced 32-bit, we can set the saving some changes for the main Visual FoxPro window when the display resolution has changed in the Windows registry:
HKEY_CURRENT_USER\Software\Microsoft\VisualFoxPro\10.n\Options\SaveDesktopSettingsWhenDisplayResolutionChanged.
In VFP Advanced 64-bit, we can set the saving some changes for the main Visual FoxPro window when the display resolution has changed in the Windows registry:
HKEY_CURRENT_USER\Software\Microsoft\VisualFoxPro64\10.n\Options\SaveDesktopSettingsWhenDisplayResolutionChanged.
2. CAUSE:
There are some BUGs in the following code.
3. RESOLUTION:
We can write some code to fix the BUG.
Fun553dc9 :: ; proc near
push ebp ;0x00553dc9 : 55
mov ebp , esp ;0x00553dca : 8bec
sub esp , 06Ch ;0x00553dcc : 83ec6c
cmp dword ptr [ Data93bb60 ] , 00h ;0x00553dcf : 833d60bb930000
mov eax , dword ptr [ Data937090 ] ;0x00553dd6 : a190709300
mov dword ptr [ ebp - 4 ] , eax ;0x00553ddb : 8945fc
jne Label553eaf ;0x00553dde : 0f85cb000000
;
; -------------------------------------------------------------------------------------------------------------------
; VFP 9.0 FIX - SAVE SOME CHANGES FOR THE MAIN VISUAL FOXPRO WINDOW WHEN THE DISPLAY RESOLUTION HAS CHANGED
; November 2025
; -------------------------------------------------------------------------------------------------------------------
; CCB
;
; SYS(9194) - Save some changes for the main Visual FoxPro window when the display resolution has changed.
;
; 2025/11/6, by ccb
;
Label553de4_sys9194_start ::
cmp dword ptr vfpa_displaychange_count,00h
je Label553de4_sys9194_end
cmp dword ptr vfpa_sys9194_data,00h
jne Label553de4_sys9194_end
jmp Label553eaf
Label553de4_sys9194_end ::
mov eax , dword ptr [ Data937794 ] ;0x00553de4 : a194779300
push esi ;0x00553de9 : 56
push edi ;0x00553dea : 57
lea esi , dword ptr [ ebp - 108 ] ;0x00553deb : 8d7594
call Fun54fea1 ;0x00553dee : e8aec0ffff
mov edi , offset Data91d4e4 ;0x00553df3 : bfe4d49100
call Fun42e3a0 ;0x00553df8 : e8a3a5edff
mov edi , eax ;0x00553dfd : 8bf8
test edi , edi ;0x00553dff : 85ff
je Label553ead ;0x00553e01 : 0f84a6000000
mov eax , dword ptr [ebx] ;0x00553e07 : 8b03
mov eax , dword ptr [ eax + 68 ] ;0x00553e09 : 8b4044
shr eax , 03h ;0x00553e0c : c1e803
and eax , 01h ;0x00553e0f : 83e001
push eax ;0x00553e12 : 50
pushd 09418h ;0x00553e13 : 6818940000
push edi ;0x00553e18 : 57
call Fun553d4a ;0x00553e19 : e82cffffff
mov eax , ebx ;0x00553e1e : 8bc3
call Fun54fea1 ;0x00553e20 : e87cc0ffff
push dword ptr [ ebp - 104 ] ;0x00553e25 : ff7598
pushd 09419h ;0x00553e28 : 6819940000
push edi ;0x00553e2d : 57
call Fun553d4a ;0x00553e2e : e817ffffff
push dword ptr [ ebp - 108 ] ;0x00553e33 : ff7594
pushd 0941Ah ;0x00553e36 : 681a940000
push edi ;0x00553e3b : 57
call Fun553d4a ;0x00553e3c : e809ffffff
mov eax , dword ptr [ ebp - 96 ] ;0x00553e41 : 8b45a0
sub eax , dword ptr [ ebp - 104 ] ;0x00553e44 : 2b4598
push eax ;0x00553e47 : 50
pushd 0941Bh ;0x00553e48 : 681b940000
push edi ;0x00553e4d : 57
call Fun553d4a ;0x00553e4e : e8f7feffff
mov eax , dword ptr [ ebp - 100 ] ;0x00553e53 : 8b459c
sub eax , dword ptr [ ebp - 108 ] ;0x00553e56 : 2b4594
push eax ;0x00553e59 : 50
pushd 0941Ch ;0x00553e5a : 681c940000
push edi ;0x00553e5f : 57
call Fun553d4a ;0x00553e60 : e8e5feffff
lea eax , dword ptr [ ebp - 92 ] ;0x00553e65 : 8d45a4
push eax ;0x00553e68 : 50
mov edx , ebx ;0x00553e69 : 8bd3
call Fun42ea61 ;0x00553e6b : e8f1abedff
call Fun4308bf ;0x00553e70 : e84acaedff
pushd 0941Dh ;0x00553e75 : 681d940000
push edi ;0x00553e7a : 57
lea ecx , dword ptr [ ebp - 92 ] ;0x00553e7b : 8d4da4
call Fun55421e ;0x00553e7e : e89b030000
mov eax , dword ptr [ Data93b96c ] ;0x00553e83 : a16cb99300
test eax , eax ;0x00553e88 : 85c0
je Label5779f8 ;0x00553e8a : 0f84683b0200
Label553e90 ::
lea ecx , dword ptr [ ebp - 92 ] ;0x00553e90 : 8d4da4
push ecx ;0x00553e93 : 51
call Fun4308bf ;0x00553e94 : e826caedff
pushd 0941Eh ;0x00553e99 : 681e940000
push edi ;0x00553e9e : 57
lea ecx , dword ptr [ ebp - 92 ] ;0x00553e9f : 8d4da4
call Fun55421e ;0x00553ea2 : e877030000
push edi ;0x00553ea7 : 57
call Fun43d889 ;0x00553ea8 : e8dc99eeff
Label553ead ::
pop edi ;0x00553ead : 5f
pop esi ;0x00553eae : 5e
Label553eaf ::
mov ecx , dword ptr [ ebp - 4 ] ;0x00553eaf : 8b4dfc
call Fun42bf1d ;0x00553eb2 : e86680edff
leave ;0x00553eb7 : c9
ret ;0x00553eb8 : c3
4. APPLIES TO:
VFP 6.0.8167.0
VFP 6.0.8961.0 (SP5)
VFP 7.0.0.9262
VFP 7.0.0.9465 (SP1)
VFP 8.0.0.2521
VFP 8.0.0.3117 (SP1)
VFP 9.0.0.2412
VFP 9.0.0.3504 (SP1)
VFP 9.0.0.4611 (SP2)
VFP 9.0.0.5015 (SP2)
VFP 9.0.0.5411 (SP2)
VFP 9.0.0.5721 (SP2)
VFP 9.0.0.5815 (SP2)
VFP 9.0.0.6303 (SP2)
VFP 9.0.0.6602 (SP2)
VFP 9.0.0.7423 (SP2)
The bug has been fixed in VFP Advanced.
5. REFERENCE WEBSITES:
1, baiyujia.com:
http://www.baiyujia.com
http://www.baiyujia.com/vfpdocuments/f_vfp9fix395.asp
http://www.baiyujia.com/vfpdocuments/f_vfp9fix131.asp
http://www.baiyujia.com/vfpdocuments/f_vfp9fix132.asp
http://www.baiyujia.com/vfpdocuments/f_vfp9fix133.asp
http://www.baiyujia.com/vfpdocuments/f_vfp9fix134.asp
http://www.baiyujia.com/vfpdocuments/f_vfp9fix135.asp
http://www.baiyujia.com/vfpdocuments/f_vfp9fix136.asp
http://www.baiyujia.com/vfpdocuments/f_vfp9fix137.asp
http://www.baiyujia.com/vfpdocuments/f_vfp9fix138.asp
http://www.baiyujia.com/vfpdocuments/f_vfp9fix201.asp
http://www.baiyujia.com/vfpdocuments/f_vfp9fix202.asp
6. OTHER:
For reference only, there is no guarantees.
Any questions or suggestions, please send me an email at ccb2000@163.com.
|