BUG: In-Top-Level Form Appears to Hang

ID: Q232092


The information in this article applies to:
  • Microsoft Visual FoxPro for Windows, versions 5.0, 5.0a, 6.0


SYMPTOMS

When a field validation rule fires while running an In-Top-Level form that is modal, the field validation message box will appear behind the In-Top-Level form. The message box cannot be seen, so it will appear as if the form is non-operational until either the ENTER or ESCAPE key is pressed. If the In-Top-Level form is modeless, then the field validation message box appears on top of the form.


STATUS

Microsoft has confirmed this to be a bug in the Microsoft products listed at the beginning of this article.


MORE INFORMATION

Steps to Reproduce Behavior

  1. Execute the following code in the Command window:


  2. 
         CREATE DATABASE mydata
         CREATE TABLE mydata1 (fld1  c(10) ;
                 CHECK(fld1 < "z") ;
                 ERROR 'Enter a character that comes before "z".')
         APPEND BLANK 
  3. Copy the following code into a prg called field_val1:


  4. 
         OPEN DATABASE mydata
         USE mydata1 SHARED
    
         PUBLIC oform1
         oform1=NEWOBJECT("form1")
         oform1.Show
    
         DEFINE CLASS form1 AS form
    
                         Height = 296
                         Width = 415
                         ShowWindow = 2
                         AutoCenter = .T.
                         Caption = "Top-Level Form"
                         Name = "Form1"
    
                         ADD OBJECT command1 AS commandbutton WITH ;
                                 Top = 132, ;
                                 Left = 132, ;
                                 Height = 27, ;
                                 Width = 120, ;
                                 Caption = "Do Field_val2.prg", ;
                                 Name = "Command1"
    
                         PROCEDURE command1.Click
                                 DO field_val2.prg
                         ENDPROC
         ENDDEFINE
     
  5. Place this code into a prg called field_val2:


  6. 
         PUBLIC oform2
    
         OPEN DATABASE mydata
         USE mydata1 SHARED
    
         oform2=NEWOBJECT("form2")
         oform2.Show
         RETURN
    
         DEFINE CLASS form2 AS form
    
                         Height = 260
                         Width = 375
                         ShowWindow = 1
                         AutoCenter = .T.
                         Caption = "In-Top-Level Form"
                         WindowType = 1
                         Name = "Form2"
    
                         ADD OBJECT txtfld1 AS textbox WITH ;
                                 Top = 55, ;
                                 Width = 79, ;
                                 ControlSource = "mydata1.fld1", ;
                                 Height = 23, ;
                                 Left = 140, ;
                                 Name = "txtFld1"
         ENDDEFINE 
  7. Run the field_val1.prg, selecting the "Do field_val2.prg" command button.


  8. Type the letter "z" in the text box and press the ENTER key. Note that the form seems to freeze, and pressing the ENTER or ESCAPE key is the only way to release the field validation's message box and return to the form.


Additional query words:

Keywords : kbCOMt kbContainer kbDatabase kbVFp500abug kbVFp600bug KbDBFDBC kbGrpFox
Version : WINDOWS:5.0,5.0a,6.0
Platform : WINDOWS
Issue type : kbbug


Last Reviewed: May 26, 1999
© 2000 Microsoft Corporation. All rights reserved. Terms of Use.