------------------------------------------------------------------------------
                      [BUG/PRB.] VFP 9.0 FIX - ALL COMMANDS RESET THE OBJECT.NAME PROPERTY
                                January 2024
                 ------------------------------------------------------------------------------
                                     CCB



1. BUG:

     In vfp9 (and vfp6, vfp7, vfp8), the MODIFY FORM command will reset the Form.Name property to the name in the Name Table Index (NTI)
     if the name already exists in the Name Table Index (NTI),
     sometimes the Form.Name property value will be converted to uppercase.

     There is a test program:

     *PROC testmodifyformcommand

     form_lowername="aaa" && the variable name is the same as the Form.Name property value ("form_lowername").

     MODIFY FORM testmodifyformcommand.scx && the Form.Name property value will be converted to uppercase ("FORM_LOWERNAME") in vfp9!

     RETURN

     * END OF PROC TESTMODIFYFORMCOMMAND.


2. CAUSE:

     There are some BUGs in the following code.


3. RESOLUTION:

     We can write some code to fix the BUG.

     Fun4bba2b :: ; proc near
             push ebp                                                        ;0x004bba2b :        55
             lea ebp ,  dword ptr [ esp + 0FFFFFA60h ]                       ;0x004bba2c :        8dac2460faffff
             sub esp , 076Ch                                                 ;0x004bba33 :        81ec6c070000
             mov eax ,  dword ptr [ Data937090 ]                             ;0x004bba39 :        a190709300
             or  dword ptr [ ebp + 68 ] , 0FFFFFFFFh                         ;0x004bba3e :        834d44ff
             mov  dword ptr [ ebp + 059Ch ] , eax                            ;0x004bba42 :        89859c050000
             mov eax ,  dword ptr [ Data936d5c ]                             ;0x004bba48 :        a15c6d9300
             push ebx                                                        ;0x004bba4d :        53
             push esi                                                        ;0x004bba4e :        56
             mov  esi , dword ptr [ ebp + 05A8h ]                            ;0x004bba4f :        8bb5a8050000
             mov  dword ptr [ ebp + 48 ] , eax                               ;0x004bba55 :        894530
             mov  eax , dword ptr [ esi + 4 ]                                ;0x004bba58 :        8b4604
             mov  eax , dword ptr [eax]                                      ;0x004bba5b :        8b00
             mov  ecx , dword ptr [eax]                                      ;0x004bba5d :        8b08
             push edi                                                        ;0x004bba5f :        57
             xor edi , edi                                                   ;0x004bba60 :        33ff
             lea eax ,  dword ptr [ ebp + 120 ]                              ;0x004bba62 :        8d4578
             mov  dword ptr [ ebp + 84 ] , edi                               ;0x004bba65 :        897d54
             mov  dword ptr [ ebp + 100 ] , edi                              ;0x004bba68 :        897d64
             mov  dword ptr [ ebp + 76 ] , edi                               ;0x004bba6b :        897d4c
             mov  dword ptr [ ebp + 108 ] , edi                              ;0x004bba6e :        897d6c
             call Fun41975b                                                  ;0x004bba71 :        e8e5dcf5ff
             mov  edx , dword ptr [ esi + 8 ]                                ;0x004bba76 :        8b5608
             mov  dword ptr [ Data936d5c ] , 01h                             ;0x004bba79 :        c7055c6d930001000000
             mov  dword ptr [ ebp + 96 ] , edi                               ;0x004bba83 :        897d60
             mov  dword ptr [ ebp + 92 ] , edi                               ;0x004bba86 :        897d5c
             call Fun43b5d5                                                  ;0x004bba89 :        e847fbf7ff
             mov  dword ptr [ ebp + 80 ] , eax                               ;0x004bba8e :        894550
             lea edx ,  dword ptr [ ebp + 56 ]                               ;0x004bba91 :        8d5538
             lea eax ,  dword ptr [ ebp + 0FFFFFED8h ]                       ;0x004bba94 :        8d85d8feffff
             call Fun42c27f                                                  ;0x004bba9a :        e8e007f7ff
             push edi                                                        ;0x004bba9f :        57
             push eax                                                        ;0x004bbaa0 :        50
             call Fun42c2be                                                  ;0x004bbaa1 :        e81808f7ff
             cmp eax , edi                                                   ;0x004bbaa6 :        3bc7
             mov  ebx , dword ptr [ ebp + 05A8h ]                            ;0x004bbaa8 :        8b9da8050000
             pop ecx                                                         ;0x004bbaae :        59
             pop ecx                                                         ;0x004bbaaf :        59
             mov  dword ptr [ ebp + 104 ] , eax                              ;0x004bbab0 :        894568
             jne Label4cbe11                                                 ;0x004bbab3 :        0f8558030100
             mov  eax , dword ptr [ ebx + 4 ]                                ;0x004bbab9 :        8b4304
             mov  ecx , dword ptr [ ebx + 28 ]                               ;0x004bbabc :        8b4b1c
             mov  dword ptr [ ebp + 116 ] , eax                              ;0x004bbabf :        894574
             mov  eax , dword ptr [ ebx + 24 ]                               ;0x004bbac2 :        8b4318
             add ecx , eax                                                   ;0x004bbac5 :        03c8
             cmp eax , ecx                                                   ;0x004bbac7 :        3bc1
             mov  dword ptr [ ebp + 112 ] , eax                              ;0x004bbac9 :        894570
             jnl Label4cbe11                                                 ;0x004bbacc :        0f8d3f030100
             jmp Label4c466d                                                 ;0x004bbad2 :        e9968b0000

     Label4c455b ::
             mov  eax , dword ptr [ ebp + 108 ]                              ;0x004c455b :        8b456c
             mov dword ptr [ Data93cbd4 ] ,  eax                             ;0x004c455e :        a3d4cb9300
             mov eax , edi                                                   ;0x004c4563 :        8bc7
             call Fun53c387                                                  ;0x004c4565 :        e81d7e0700
             mov  esi , dword ptr [ ebp + 05A8h ]                            ;0x004c456a :        8bb5a8050000
             add esi , 054h                                                  ;0x004c4570 :        83c654
             mov  eax , dword ptr [esi]                                      ;0x004c4573 :        8b06
             test eax , eax                                                  ;0x004c4575 :        85c0
             je Label4c457e                                                  ;0x004c4577 :        7405
             call Fun53c387                                                  ;0x004c4579 :        e8097e0700

     Label4c457e ::
             mov eax ,  dword ptr [ Data9388dc ]                             ;0x004c457e :        a1dc889300
             mov  eax , dword ptr [ ebx + eax + 48 ]                         ;0x004c4583 :        8b440330
             test eax , eax                                                  ;0x004c4587 :        85c0
             js Label4c1129                                                  ;0x004c4589 :        0f889acbffff

     Label4c458f ::
             pushd 0E9h                                                      ;0x004c458f :        68e9000000
             push  dword ptr [ ebp + 05ACh ]                                 ;0x004c4594 :        ffb5ac050000
             push edi                                                        ;0x004c459a :        57
             call Fun43bc72                                                  ;0x004c459b :        e8d276f7ff
             cmp  dword ptr [esi] , 00h                                      ;0x004c45a0 :        833e00
             mov  dword ptr [ ebp + 64 ] , eax                               ;0x004c45a3 :        894540
             je Label4c45c3                                                  ;0x004c45a6 :        741b
             mov  ecx , dword ptr [esi]                                      ;0x004c45a8 :        8b0e
             call Fun4f17b1                                                  ;0x004c45aa :        e802d20200
             mov  ecx , dword ptr [esi]                                      ;0x004c45af :        8b0e
             mov  dword ptr [ ebp + 40 ] , eax                               ;0x004c45b1 :        894528
             call Fun43b3af                                                  ;0x004c45b4 :        e8f66df7ff
             cmp  dword ptr [ ebp + 40 ] , 01h                               ;0x004c45b9 :        837d2801
             je Label5df4dd                                                  ;0x004c45bd :        0f841aaf1100

     Label4c45c3 ::
             mov ecx , edi                                                   ;0x004c45c3 :        8bcf
             call Fun4f17b1                                                  ;0x004c45c5 :        e8e7d10200
             cmp eax , 01h                                                   ;0x004c45ca :        83f801
             je Label5df4fa                                                  ;0x004c45cd :        0f8427af1100
             mov ecx , edi                                                   ;0x004c45d3 :        8bcf
             call Fun43b3af                                                  ;0x004c45d5 :        e8d56df7ff

     Label4c45da ::
             mov  ecx , dword ptr [ ebp + 64 ]                               ;0x004c45da :        8b4d40
             xor esi , esi                                                   ;0x004c45dd :        33f6
             cmp ecx , esi                                                   ;0x004c45df :        3bce
             jne Label5df506                                                 ;0x004c45e1 :        0f851faf1100
             cmp  dword ptr [ ebp + 100 ] , esi                              ;0x004c45e7 :        397564
             jne Label5df511                                                 ;0x004c45ea :        0f8521af1100

     Label4c45f0 ::
             mov  dword ptr [ Data93cbd4 ] , esi                             ;0x004c45f0 :        8935d4cb9300

     Label4c45f6 ::
             cmp  dword ptr [ ebp + 100 ] , 00h                              ;0x004c45f6 :        837d6400
             jne Label5df52e                                                 ;0x004c45fa :        0f852eaf1100
             cmp  dword ptr [ ebp + 80 ] , 04h                               ;0x004c4600 :        837d5004
             jne Label4c4613                                                 ;0x004c4604 :        750d
             mov esi , edi                                                   ;0x004c4606 :        8bf7
             call Fun4c4bb0                                                  ;0x004c4608 :        e8a3050000
             mov  dword ptr [ ebp + 100 ] , eax                              ;0x004c460d :        894564
             mov  dword ptr [ ebp + 108 ] , edi                              ;0x004c4610 :        897d6c

     Label4c4613 ::
             cmp  dword ptr [ ebp + 100 ] , 00h                              ;0x004c4613 :        837d6400
             jne Label5df52e                                                 ;0x004c4617 :        0f8511af1100

     Label4c461d ::
             mov  esi , dword ptr [ ebp + 05A8h ]                            ;0x004c461d :        8bb5a8050000
             mov  edx , dword ptr [ esi + 4 ]                                ;0x004c4623 :        8b5604
             pushd 09h                                                       ;0x004c4626 :        6a09
             call Fun42a5df                                                  ;0x004c4628 :        e8b25ff6ff
             test eax , eax                                                  ;0x004c462d :        85c0
             jne Label5df594                                                 ;0x004c462f :        0f855faf1100

     Label4c4635 ::
             xor eax , eax                                                   ;0x004c4635 :        33c0
             cmp  dword ptr [ ebp + 72 ] , eax                               ;0x004c4637 :        394548
             jne Label4c4652                                                 ;0x004c463a :        7516
             cmp  dword ptr [esi] , 01h                                      ;0x004c463c :        833e01
             jne Label4c4652                                                 ;0x004c463f :        7511
             push eax                                                        ;0x004c4641 :        50
             push eax                                                        ;0x004c4642 :        50
             push eax                                                        ;0x004c4643 :        50
             push edi                                                        ;0x004c4644 :        57
             pushd 022h                                                      ;0x004c4645 :        6a22
             mov  dword ptr [ esi + 56 ] , eax                               ;0x004c4647 :        894638
             call Fun4f8b6c                                                  ;0x004c464a :        e81d450300
             add esp , 014h                                                  ;0x004c464f :        83c414

     Label4c4652 ::
             mov  ebx , dword ptr [ ebp + 05A8h ]                            ;0x004c4652 :        8b9da8050000

     Label4c4658 ::
             inc  dword ptr [ ebp + 112 ]                                    ;0x004c4658 :        ff4570
             inc  dword ptr [ ebx + 32 ]                                     ;0x004c465b :        ff4320
             mov  eax , dword ptr [ ebx + 28 ]                               ;0x004c465e :        8b431c
             add  eax , dword ptr [ ebx + 24 ]                               ;0x004c4661 :        034318
             cmp  dword ptr [ ebp + 112 ] , eax                              ;0x004c4664 :        394570
             jnl Label4cbe0f                                                 ;0x004c4667 :        0f8da2770000

     Label4c466d ::
             mov  edx , dword ptr [ ebp + 112 ]                              ;0x004c466d :        8b5570
             mov  ecx , dword ptr [ ebp + 116 ]                              ;0x004c4670 :        8b4d74
             xor esi , esi                                                   ;0x004c4673 :        33f6
             mov  dword ptr [ ebp + 72 ] , esi                               ;0x004c4675 :        897548
             mov  dword ptr [ ebx + 56 ] , esi                               ;0x004c4678 :        897338
             call Fun434624                                                  ;0x004c467b :        e8a4fff6ff
             cmp  dword ptr [ ebp + 100 ] , esi                              ;0x004c4680 :        397564
             jne Label5df2ce                                                 ;0x004c4683 :        0f8545ac1100

     Label4c4689 ::
             mov  edx , dword ptr [ ebp + 116 ]                              ;0x004c4689 :        8b5574
             pushd 040h                                                      ;0x004c468c :        6a40
             pop ecx                                                         ;0x004c468e :        59
             xor eax , eax                                                   ;0x004c468f :        33c0
             lea edi ,  dword ptr [ ebp + 0288h ]                            ;0x004c4691 :        8dbd88020000
             rep stosd                                                       ;0x004c4697 :        f3ab
             pushd 03h                                                       ;0x004c4699 :        6a03
             stosb                                                           ;0x004c469b :        aa
             push esi                                                        ;0x004c469c :        56
             lea eax ,  dword ptr [ ebp + 0288h ]                            ;0x004c469d :        8d8588020000
             push eax                                                        ;0x004c46a3 :        50
             mov ecx , 0100h                                                 ;0x004c46a4 :        b900010000
             call Fun42a569                                                  ;0x004c46a9 :        e8bb5ef6ff
             mov  edx , dword ptr [ ebp + 116 ]                              ;0x004c46ae :        8b5574
             pushd 04h                                                       ;0x004c46b1 :        6a04
             call Fun42a5df                                                  ;0x004c46b3 :        e8275ff6ff
             cmp eax , esi                                                   ;0x004c46b8 :        3bc6
             mov  dword ptr [ ebp + 88 ] , eax                               ;0x004c46ba :        894558
             jne Label4bbd4c                                                 ;0x004c46bd :        0f858976ffff

     Label4c46c3 ::
             cmp  dword ptr [ebx] , 01h                                      ;0x004c46c3 :        833b01
             jne Label4bbbdc                                                 ;0x004c46c6 :        0f851075ffff
             lea edx ,  dword ptr [ ebp + 44 ]                               ;0x004c46cc :        8d552c
             lea eax ,  dword ptr [ ebp + 0FFFFFF78h ]                       ;0x004c46cf :        8d8578ffffff
             call Fun42c27f                                                  ;0x004c46d5 :        e8a57bf6ff
             push esi                                                        ;0x004c46da :        56
             push eax                                                        ;0x004c46db :        50
             call Fun42c2be                                                  ;0x004c46dc :        e8dd7bf6ff
             mov ebx , eax                                                   ;0x004c46e1 :        8bd8
             cmp ebx , esi                                                   ;0x004c46e3 :        3bde
             pop ecx                                                         ;0x004c46e5 :        59
             pop ecx                                                         ;0x004c46e6 :        59
             jne Label5df3a4                                                 ;0x004c46e7 :        0f85b7ac1100
             mov  edx , dword ptr [ ebp + 116 ]                              ;0x004c46ed :        8b5574
             pushd 040h                                                      ;0x004c46f0 :        6a40
             pop ecx                                                         ;0x004c46f2 :        59
             xor eax , eax                                                   ;0x004c46f3 :        33c0
             lea edi ,  dword ptr [ ebp + 0180h ]                            ;0x004c46f5 :        8dbd80010000
             rep stosd                                                       ;0x004c46fb :        f3ab
             pushd 05h                                                       ;0x004c46fd :        6a05
             stosb                                                           ;0x004c46ff :        aa
             call Fun42a5df                                                  ;0x004c4700 :        e8da5ef6ff
             test eax , eax                                                  ;0x004c4705 :        85c0
             je Label4c4720                                                  ;0x004c4707 :        7417
             mov  edx , dword ptr [ ebp + 116 ]                              ;0x004c4709 :        8b5574
             pushd 05h                                                       ;0x004c470c :        6a05
             push esi                                                        ;0x004c470e :        56
             lea eax ,  dword ptr [ ebp + 0180h ]                            ;0x004c470f :        8d8580010000
             push eax                                                        ;0x004c4715 :        50
             mov ecx , 0100h                                                 ;0x004c4716 :        b900010000
             call Fun42a569                                                  ;0x004c471b :        e8495ef6ff

     Label4c4720 ::
             mov  edi , dword ptr [ ebp + 05A8h ]                            ;0x004c4720 :        8bbda8050000
             push edi                                                        ;0x004c4726 :        57
             call Fun4c4982                                                  ;0x004c4727 :        e856020000
             mov  cl , byte ptr [ ebp + 0180h ]                              ;0x004c472c :        8a8d80010000
             push  dword ptr [ edi + 8 ]                                     ;0x004c4732 :        ff7708
             neg cl                                                          ;0x004c4735 :        f6d9
             lea edx ,  dword ptr [ ebp + 0180h ]                            ;0x004c4737 :        8d9580010000
             mov  dword ptr [ ebp + 92 ] , eax                               ;0x004c473d :        89455c
             sbb ecx , ecx                                                   ;0x004c4740 :        1bc9
             and ecx , edx                                                   ;0x004c4742 :        23ca
             push ecx                                                        ;0x004c4744 :        51
             mov  ecx , dword ptr [ ebp + 88 ]                               ;0x004c4745 :        8b4d58
             neg ecx                                                         ;0x004c4748 :        f7d9
             sbb ecx , ecx                                                   ;0x004c474a :        1bc9
             lea edx ,  dword ptr [ ebp + 0390h ]                            ;0x004c474c :        8d9590030000
             and ecx , edx                                                   ;0x004c4752 :        23ca
             push ecx                                                        ;0x004c4754 :        51
             lea ecx ,  dword ptr [ ebp + 0288h ]                            ;0x004c4755 :        8d8d88020000
             push ecx                                                        ;0x004c475b :        51
             push eax                                                        ;0x004c475c :        50
             call Fun4c4a62                                                  ;0x004c475d :        e800030000
             mov esi , eax                                                   ;0x004c4762 :        8bf0
             mov  dword ptr [ ebp + 96 ] , esi                               ;0x004c4764 :        897560
             mov  dword ptr [ edi + 12 ] , esi                               ;0x004c4767 :        89770c

     Label4c476a ::
             lea eax ,  dword ptr [ ebp + 44 ]                               ;0x004c476a :        8d452c
             push eax                                                        ;0x004c476d :        50
             lea eax ,  dword ptr [ ebp + 0FFFFFF78h ]                       ;0x004c476e :        8d8578ffffff
             call Fun42d200                                                  ;0x004c4774 :        e8878af6ff
             cmp ebx , 03D4h                                                 ;0x004c4779 :        81fbd4030000
             je Label5df3ac                                                  ;0x004c477f :        0f8427ac1100
             cmp ebx , 01A4h                                                 ;0x004c4785 :        81fba4010000
             jnl Label5df3c3                                                 ;0x004c478b :        0f8d32ac1100

     Label4c4791 ::
             test ebx , ebx                                                  ;0x004c4791 :        85db
             jne Label5df3df                                                 ;0x004c4793 :        0f8546ac1100
             mov eax ,  dword ptr [ Data9388dc ]                             ;0x004c4799 :        a1dc889300
             lea edi ,  dword ptr [ esi + 4 * esi ]                          ;0x004c479e :        8d3cb6
             shl edi , 05h                                                   ;0x004c47a1 :        c1e705
             xor ebx , ebx                                                   ;0x004c47a4 :        33db
             test  byte ptr [ edi + eax + 51 ] , 080h                        ;0x004c47a6 :        f644073380
             jne Label5df3e6                                                 ;0x004c47ab :        0f8535ac1100

     Label4c47b1 ::
             mov eax ,  dword ptr [ Data9388dc ]                             ;0x004c47b1 :        a1dc889300
             cmp  word ptr [ edi + eax + 16 ] , 0332h                        ;0x004c47b6 :        66817c07103203
             je Label4bcc04                                                  ;0x004c47bd :        0f844184ffff

     Label4c47c3 ::
             mov  edx , dword ptr [ ebp + 116 ]                              ;0x004c47c3 :        8b5574
             mov eax , esi                                                   ;0x004c47c6 :        8bc6
             call Fun4c4b94                                                  ;0x004c47c8 :        e8c7030000
             cmp  dword ptr [ ebp + 92 ] , ebx                               ;0x004c47cd :        395d5c
             mov  eax , dword ptr [ ebp + 112 ]                              ;0x004c47d0 :        8b4570
             mov  ecx , dword ptr [ Data9388dc ]                             ;0x004c47d3 :        8b0ddc889300
             mov  dword ptr [ edi + ecx + 088h ] , eax                       ;0x004c47d9 :        89840f88000000
             je Label4c48a0                                                  ;0x004c47e0 :        0f84ba000000
             push  dword ptr [ ebp + 92 ]                                    ;0x004c47e6 :        ff755c
             mov ebx , esi                                                   ;0x004c47e9 :        8bde
             call Fun4cdfb0                                                  ;0x004c47eb :        e8c0970000
             test eax , eax                                                  ;0x004c47f0 :        85c0
             je Label5df433                                                  ;0x004c47f2 :        0f843bac1100

     Label4c47f8 ::
             lea edx ,  dword ptr [ ebp + 60 ]                               ;0x004c47f8 :        8d553c
             lea eax ,  dword ptr [ ebp + 0FFFFFF28h ]                       ;0x004c47fb :        8d8528ffffff
             call Fun42c27f                                                  ;0x004c4801 :        e8797af6ff
             pushd 00h                                                       ;0x004c4806 :        6a00
             push eax                                                        ;0x004c4808 :        50
             call Fun42c2be                                                  ;0x004c4809 :        e8b07af6ff
             mov  esi , dword ptr [ ebp + 96 ]                               ;0x004c480e :        8b7560
             mov edi , eax                                                   ;0x004c4811 :        8bf8
             test edi , edi                                                  ;0x004c4813 :        85ff
             pop ecx                                                         ;0x004c4815 :        59
             pop ecx                                                         ;0x004c4816 :        59
             mov  dword ptr [ ebp + 104 ] , edi                              ;0x004c4817 :        897d68
             jne Label4c487d                                                 ;0x004c481a :        7561
             mov  ebx , dword ptr [ ebp + 05A8h ]                            ;0x004c481c :        8b9da8050000


     ;
     ;                 -------------------------------------------------------------------
     ;                      VFP 9.0 FIX - ALL COMMANDS RESET THE OBJECT.NAME PROPERTY
     ;                                  April 2023
     ;                 -------------------------------------------------------------------
     ;                                     CCB
     ;
     ; In vfp9, the MODIFY FORM command will reset the Form.Name property to the name in the Name Table Index (NTI)
     ; if the name already exists in the Name Table Index (NTI),
     ; sometimes the Form.Name property value will be converted to uppercase.
     ; In VFP Advanced, the MODIFY FORM command will not reset the Form.Name property.
     ;
     ; 2023/4/6, by ccb
     ;

     ;         mov dword ptr vfpa_modifyform_ismodifyform,01h
             movzx eax , byte ptr [ ebx + 20 ]
             mov dword ptr vfpa_modifyform_isdoform,eax


             push  dword ptr [ ebp + 92 ]                                    ;0x004c4822 :        ff755c
             mov  ecx , dword ptr [ ebx + 8 ]                                ;0x004c4825 :        8b4b08
             mov eax , esi                                                   ;0x004c4828 :        8bc6
             call Fun4c4bd0                                                  ;0x004c482a :        e8a1030000


     ;
     ;                 -------------------------------------------------------------------
     ;                      VFP 9.0 FIX - ALL COMMANDS RESET THE OBJECT.NAME PROPERTY
     ;                                  April 2023
     ;                 -------------------------------------------------------------------
     ;                                     CCB
     ;
     ; In vfp9, the MODIFY FORM command will reset the Form.Name property to the name in the Name Table Index (NTI)
     ; if the name already exists in the Name Table Index (NTI),
     ; sometimes the Form.Name property value will be converted to uppercase.
     ; In VFP Advanced, the MODIFY FORM command will not reset the Form.Name property.
     ;
     ; 2023/4/6, by ccb
     ;

     Label4c482e ::
     ;         mov dword ptr vfpa_modifyform_ismodifyform,00h
             mov dword ptr vfpa_modifyform_isdoform,00h


     Label4c482f ::
             mov  edx , dword ptr [ ebp + 116 ]                              ;0x004c482f :        8b5574
             pushd 06h                                                       ;0x004c4832 :        6a06
             call Fun42a5df                                                  ;0x004c4834 :        e8a65df6ff
             mov  edx , dword ptr [ ebp + 116 ]                              ;0x004c4839 :        8b5574
             pushd 06h                                                       ;0x004c483c :        6a06
             mov edi , eax                                                   ;0x004c483e :        8bf8
             pushd 00h                                                       ;0x004c4840 :        6a00
             lea eax ,  dword ptr [ ebp + 0498h ]                            ;0x004c4842 :        8d8598040000
             push eax                                                        ;0x004c4848 :        50
             mov ecx , 0FEh                                                  ;0x004c4849 :        b9fe000000
             call Fun42a569                                                  ;0x004c484e :        e8165df6ff
             pushd 0FFFFFFFFh                                                ;0x004c4853 :        6aff
             push edi                                                        ;0x004c4855 :        57
             lea eax ,  dword ptr [ ebp + 0498h ]                            ;0x004c4856 :        8d8598040000
             push eax                                                        ;0x004c485c :        50
             push  dword ptr [ ebx + 8 ]                                     ;0x004c485d :        ff7308
             mov  byte ptr [ ebp + edi + 0498h ] , 00h                       ;0x004c4860 :        c6843d9804000000
             pushd 00h                                                       ;0x004c4868 :        6a00
             pushd 0FFFFFFFFh                                                ;0x004c486a :        6aff
             pushd 01A5h                                                     ;0x004c486c :        68a5010000
             push esi                                                        ;0x004c4871 :        56
             call Fun41c715                                                  ;0x004c4872 :        e89e7ef5ff
             mov  edi , dword ptr [ ebp + 104 ]                              ;0x004c4877 :        8b7d68
             add esp , 020h                                                  ;0x004c487a :        83c420

     Label4c487d ::
             lea eax ,  dword ptr [ ebp + 60 ]                               ;0x004c487d :        8d453c
             push eax                                                        ;0x004c4880 :        50
             lea eax ,  dword ptr [ ebp + 0FFFFFF28h ]                       ;0x004c4881 :        8d8528ffffff
             call Fun42d200                                                  ;0x004c4887 :        e87489f6ff
             cmp edi , 01A4h                                                 ;0x004c488c :        81ffa4010000
             jnl Label5df462                                                 ;0x004c4892 :        0f8dcaab1100

     Label4c4898 ::
             test edi , edi                                                  ;0x004c4898 :        85ff
             jne Label5df479                                                 ;0x004c489a :        0f85d9ab1100

     Label4c48a0 ::
             mov eax ,  dword ptr [ Data9388dc ]                             ;0x004c48a0 :        a1dc889300
             mov  ebx , dword ptr [ ebp + 05A8h ]                            ;0x004c48a5 :        8b9da8050000
             lea edi ,  dword ptr [ esi + 4 * esi ]                          ;0x004c48ab :        8d3cb6
             shl edi , 05h                                                   ;0x004c48ae :        c1e705
             test  byte ptr [ edi + eax + 48 ] , 02h                         ;0x004c48b1 :        f644073002
             jne Label4bee78                                                 ;0x004c48b6 :        0f85bca5ffff
             cmp  dword ptr [ebx] , 01h                                      ;0x004c48bc :        833b01
             jne Label4bee78                                                 ;0x004c48bf :        0f85b3a5ffff

     Label4c48c5 ::
             xor edi , edi                                                   ;0x004c48c5 :        33ff
             cmp esi , edi                                                   ;0x004c48c7 :        3bf7
             je Label5df4c4                                                  ;0x004c48c9 :        0f84f5ab1100
             cmp  dword ptr [ ebx + 16 ] , edi                               ;0x004c48cf :        397b10
             je Label4bc96a                                                  ;0x004c48d2 :        0f849280ffff

     Label4c48d8 ::
             lea edx ,  dword ptr [ ebp + 28 ]                               ;0x004c48d8 :        8d551c
             lea eax ,  dword ptr [ ebp - 56 ]                               ;0x004c48db :        8d45c8
             call Fun42c27f                                                  ;0x004c48de :        e89c79f6ff
             push edi                                                        ;0x004c48e3 :        57
             push eax                                                        ;0x004c48e4 :        50
             call Fun42c2be                                                  ;0x004c48e5 :        e8d479f6ff
             mov  esi , dword ptr [ ebp + 05A8h ]                            ;0x004c48ea :        8bb5a8050000
             mov ebx , eax                                                   ;0x004c48f0 :        8bd8
             cmp ebx , edi                                                   ;0x004c48f2 :        3bdf
             pop ecx                                                         ;0x004c48f4 :        59
             pop ecx                                                         ;0x004c48f5 :        59
             mov  dword ptr [ ebp + 104 ] , ebx                              ;0x004c48f6 :        895d68
             jne Label4c4903                                                 ;0x004c48f9 :        7508
             pushd 08h                                                       ;0x004c48fb :        6a08
             push esi                                                        ;0x004c48fd :        56
             call Fun4f8f8f                                                  ;0x004c48fe :        e88c460300

     Label4c4903 ::
             lea eax ,  dword ptr [ ebp + 28 ]                               ;0x004c4903 :        8d451c
             push eax                                                        ;0x004c4906 :        50
             lea eax ,  dword ptr [ ebp - 56 ]                               ;0x004c4907 :        8d45c8
             call Fun42d200                                                  ;0x004c490a :        e8f188f6ff
             cmp ebx , 03D4h                                                 ;0x004c490f :        81fbd4030000
             je Label5df4ce                                                  ;0x004c4915 :        0f84b3ab1100
             cmp ebx , edi                                                   ;0x004c491b :        3bdf
             jne Label5df4d6                                                 ;0x004c491d :        0f85b3ab1100
             pushd 02h                                                       ;0x004c4923 :        6a02
             pop eax                                                         ;0x004c4925 :        58
             cmp  dword ptr [esi] , eax                                      ;0x004c4926 :        3906
             je Label4beadb                                                  ;0x004c4928 :        0f84ada1ffff

     Label4c492e ::
             mov  esi , dword ptr [ ebp + 05A8h ]                            ;0x004c492e :        8bb5a8050000
             push eax                                                        ;0x004c4934 :        50
             pushd 0Bh                                                       ;0x004c4935 :        6a0b
             pushd 0Ah                                                       ;0x004c4937 :        6a0a
             pushd offset Label4fa1ee                                                  ;0x004c4939 :        68eea14f00
             call Fun4f9527                                                  ;0x004c493e :        e8e44b0300
             mov  edi , dword ptr [ ebp + 96 ]                               ;0x004c4943 :        8b7d60
             mov eax ,  dword ptr [ Data9388dc ]                             ;0x004c4946 :        a1dc889300
             mov  ecx , dword ptr [ ebp + 112 ]                              ;0x004c494b :        8b4d70
             lea ebx ,  dword ptr [ edi + 4 * edi ]                          ;0x004c494e :        8d1cbf
             shl ebx , 05h                                                   ;0x004c4951 :        c1e305
             add eax , ebx                                                   ;0x004c4954 :        03c3
             mov  dword ptr [ eax + 088h ] , ecx                             ;0x004c4956 :        898888000000
             and  dword ptr [ eax + 48 ] , 0FFFFFFBFh                        ;0x004c495c :        836030bf
             mov eax , esi                                                   ;0x004c4960 :        8bc6
             cmp  dword ptr [eax] , 01h                                      ;0x004c4962 :        833801
             jne Label4c45f6                                                 ;0x004c4965 :        0f858bfcffff
             cmp  dword ptr [ ebp + 108 ] , 00h                              ;0x004c496b :        837d6c00
             jne Label4c455b                                                 ;0x004c496f :        0f85e6fbffff
             call Fun4bc80f                                                  ;0x004c4975 :        e8957effff
             mov  dword ptr [ ebp + 108 ] , eax                              ;0x004c497a :        89456c
             jmp Label4c455b                                                 ;0x004c497d :        e9d9fbffff


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.

     IMPORTANT NOTE:
     Some commands will reset the Object.Name property to the name in the Name Table Index (NTI)
     if the name already exists in the Name Table Index (NTI),
     sometimes the Object.Name property value will be converted to uppercase, lowercase or mixedcase.

     We can use the Form.Name property to locate a form, for example,
     PRIVATE m.q_form_main
     m.q_form_main=""
     PRIVATE m.q_forms_nn
     m.q_forms_nn=1
     DO WHILE TYPE("_SCREEN.FORMS(m.q_forms_nn)")="O"
        IF UPPE(ALLTRIM(_SCREEN.FORMS(m.q_forms_nn).NAME))==UPPE(ALLTRIM("form_main"))
           m.q_form_main=_SCREEN.FORMS(m.q_forms_nn)
           EXIT
        ENDI
        m.q_forms_nn=m.q_forms_nn+1
     ENDDO


5. REFERENCE WEBSITES:

     1, baiyujia.com:
     http://www.baiyujia.com
     http://www.baiyujia.com/vfpdocuments/f_vfp9fix265.asp
     http://www.baiyujia.com/vfpdocuments/f_vfp9fix15.asp

     2, foxite.com:
     https://www.foxite.com/archives/delta-show-form-name-case-changed-0000494235.htm


6. OTHER:

     For reference only, there is no guarantees.

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