Microsoft KB Archive/221613

= FIX: Clicking Page Tab Executes Container Click Event =

Article ID: 221613

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 Q221613



SYMPTOMS
A form's Click event fires when both it and the Click event of individual pages of a pageframe contain code. The page's Click event should be the only event that fires.



STATUS
Microsoft has confirmed that this is a bug in the Microsoft products that are listed at the beginning of this article.

This bug was corrected in Visual Studio 6.0 Service Pack 3.



Steps to Reproduce Behavior
  Create a program that contains the following code: frmMyForm = CREATEOBJECT("mytestform") frmMyForm.SHOW(1)

DEFINE CLASS mytestform AS FORM CAPTION= "Click on the Page Tabs"

ADD OBJECT pageframe1 AS PAGEFRAME WITH ; PAGECOUNT = 3, ; page1.CAPTION = "Page1", ; Page2.CAPTION = "Page2"

PROCEDURE pageframe1.page1.CLICK WAIT WINDOW "Page 1" ENDPROC

PROCEDURE pageframe1.Page2.CLICK WAIT WINDOW "Page 2" ENDPROC

PROCEDURE pageframe1.page3.CLICK WAIT WINDOW "Page 3" ENDPROC

PROCEDURE CLICK WAIT WINDOW "Form Click" NOWAIT ENDPROC

ENDDEFINE  Run the program. Click from tab to tab.

In Visual FoxPro 6.0, occasionally the form's Click event fires even though you click on the pages of the pageframe. In Visual FoxPro 5.0a, the form's Click event seems to fire much more often.

In Visual FoxPro 5.0, if the pageframe resides in a container object, then you see similar behavior: the Click event of the container object fires. This particular behavior does not seem to occur as often when running a form with that configuration in Visual FoxPro 6.0.

Keywords: kbbug kbfix kboop kbcontainer kbctrl kbvs600sp3fix KB221613

-

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

© Microsoft Corporation. All rights reserved.