Microsoft KB Archive/128337

= How to Make a Terminating Command Button =

Article ID: 128337

Article Last Modified on 2/12/2000

-

APPLIES TO


 * Microsoft Visual FoxPro 3.0 Standard Edition

-



This article was previously published under Q128337



SUMMARY
This article shows by example how to create a command button on a form that will close the form in Visual FoxPro.

In FoxPro version 2.x, you could do this by selecting the "Terminate Read on Selection" check box for the push button options. There is no such option for a Visual FoxPro command button.



Step-by-Step Example
This example creates a new form with a command button that when clicked will close the form.   Create a new form: CREATE FORM  Place a command button on the form. Change the caption property of the command button to "Quit".  Type the following code in the click event handler of the command button: IF TYPE('ThisForm.parent') = "O" RELEASE ThisFormSet ELSE RELEASE ThisForm ENDIF  Choose Run Form from the Form menu. Click the Quit button, and the form will close.</ol>

Additional query words: VFoxWin 3.00

Keywords: kbcode KB128337

-

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

© Microsoft Corporation. All rights reserved.