---------------------------------------------------------------------------------------
                        [BUG/PRB.] VFP 9.0 FIX - PROCESS WINDOWS MESSAGES WHEN A PROGRAM IS RUNNING
                                 January 2026
                 ---------------------------------------------------------------------------------------
                                     CCB



1. BUG:

     In vfp9 (and vfp6, vfp7, vfp8), when a program is running, it will process Windows messages when SET("ESCAPE")="ON",
     it will not process Windows messages when SET("ESCAPE")="OFF".

     If a vfp9 program is running for a long time, it will be "no response" status.
     If we run another vfp9 program, when we press CTRL+C to copy text to the clipboard,
     it will freeze (or "no response") until the the first program runs complete.
     If we run another vfp9 program, when we quit the program,
     sometimes it will freeze (or "no response") until the the first program runs complete.

     In VFP Advanced, when the program is running, it will ALWAYS process Windows messages.

     If a VFP Advanced program is running for a long time, it will be normal status.
     If we run another VFP Advanced program, we can press CTRL+C to copy text to the clipboard,
     there is no the "no response" problem.

     Now we can run more VFP Advanced programs at the same time, and there is no the "no response" problem.

     Please refer to the picture testlargefile.png:


2. CAUSE:

     There are some BUGs in the following code.


3. RESOLUTION:

     We can write some code to fix the BUG.

     Fun53c2f8 :: ; proc near
             xor ecx , ecx                                                   ;0x0053c2f8 :        33c9
             push ebx                                                        ;0x0053c2fa :        53
             inc ecx                                                         ;0x0053c2fb :        41
             call Fun42e42c                                                  ;0x0053c2fc :        e82b21efff
             mov eax ,  dword ptr [ Data936dc0 ]                             ;0x0053c301 :        a1c06d9300
             xor ebx , ebx                                                   ;0x0053c306 :        33db


     ;
     ;                 --------------------------------------------------------------------------
     ;                      VFP 9.0 FIX - PROCESS WINDOWS MESSAGES WHEN A PROGRAM IS RUNNING
     ;                                 January 2026
     ;                 --------------------------------------------------------------------------
     ;                                     CCB
     ;
     ; In vfp9, when the program is running, it will process Windows messages when SET("ESCAPE")="ON",
     ; it will not process Windows messages when SET("ESCAPE")="OFF".
     ; In VFP Advanced, when the program is running, it will ALWAYS process Windows messages.
     ;
     ; 2026/1/16, by ccb
     ;

             cmp dword ptr vfpa_sys9200_data,00h
             je Label53c308
             cmp dword ptr vfpa_sys9200_data[8],00h
             jne Label53c308
             jmp Label53c314


     Label53c308 ::
             cmp  dword ptr [ Data936de8 ] , ebx                             ;0x0053c308 :        391de86d9300
             jne Label4f03f3                                                 ;0x0053c30e :        0f85df40fbff

     Label53c314 ::
             cmp  dword ptr [ Data93d91c ] , ebx                             ;0x0053c314 :        391d1cd99300
             je Label53c328                                                  ;0x0053c31a :        740c
             cmp  byte ptr [ Data93d920 ] , bl                               ;0x0053c31c :        381d20d99300
             jne Label5aeff5                                                 ;0x0053c322 :        0f85cd2c0700

     Label53c328 ::
             cmp  dword ptr [ Data93d914 ] , ebx                             ;0x0053c328 :        391d14d99300
             jne Label4b578b                                                 ;0x0053c32e :        0f855794f7ff

     Label53c334 ::
             pop ebx                                                         ;0x0053c334 :        5b
             ret                                                             ;0x0053c335 :        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_vfp9fix404.asp

     2, mail-archive.com:
     https://www.mail-archive.com/profox@leafe.com/msg133645.html


6. OTHER:

     For reference only, there is no guarantees.

     Any questions or suggestions, please send me an email at ccb2000@163.com.