Microsoft KB Archive/232092

= BUG: In-Top-Level Form Appears to Hang =

Article ID: 232092

Article Last Modified on 10/16/2002

-

APPLIES TO


 * Microsoft Visual FoxPro 5.0 Standard Edition
 * Microsoft Visual FoxPro 5.0a
 * Microsoft Visual FoxPro 6.0 Professional Edition

-



This article was previously published under Q232092



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 that this is a bug in the Microsoft products that are listed at the beginning of this article.



Steps to Reproduce Behavior
  Execute the following code in the Command window: CREATE DATABASE mydata CREATE TABLE mydata1 (fld1 c(10) ;             CHECK(fld1 < "z") ;             ERROR 'Enter a character that comes before "z".') APPEND BLANK   Copy the following code into a prg called field_val1: 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

  Place this code into a prg called field_val2: 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  Run the field_val1.prg, selecting the "Do field_val2.prg" command button. 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.

Keywords: kbbug kbdatabase kbcontainer kbpending KB232092

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.