CloseGUIObject
Details and Options
- To use CloseGUIObject, you first need to load GUIKit using Needs["GUIKit`"].
- CloseGUIObject programmatically initiates a close action (which is normally initiated interactively by user actions such as closing the window).
- CloseGUIObject will not necessarily force the removal of all interface resources (like ReleaseGUIObject) if an initial GUIRun has requested that the interface live on past its closing by using the option ReleaseMethod -> Manual.
- Use CloseGUIObject instead of ReleaseGUIObject to ensure the original life cycle intent of a GUIRun call.
Examples
open all close allBasic Examples (1)
Needs["GUIKit`"]Create a live interface object:
ref = GUIRun["Wolfram/Example/Calculator"]Verify that the interface is active:
GUIObjectQ[ref ]Request that the window close:
CloseGUIObject[ref ]Confirm that the interface is no longer valid:
GUIObjectQ[ref ]Scope (1)
Needs["GUIKit`"]Create an interface that stays active after being closed:
ref = GUIRun["Wolfram/Example/Calculator", ReleaseMethod -> Manual]Request that the window close:
CloseGUIObject[ref ]Verify that the interface is still active:
GUIObjectQ[ref ]Force complete termination of the interface:
ReleaseGUIObject[ref ]Verify that the interface is no longer active:
GUIObjectQ[ref ]See Also
Tech Notes
Related Guides
Text
Wolfram Research (2007), CloseGUIObject, Wolfram Language function, https://reference.wolfram.com/language/GUIKit/ref/CloseGUIObject.html.
CMS
Wolfram Language. 2007. "CloseGUIObject." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/GUIKit/ref/CloseGUIObject.html.
APA
Wolfram Language. (2007). CloseGUIObject. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/GUIKit/ref/CloseGUIObject.html
BibTeX
@misc{reference.wolfram_2026_closeguiobject, author="Wolfram Research", title="{CloseGUIObject}", year="2007", howpublished="\url{https://reference.wolfram.com/language/GUIKit/ref/CloseGUIObject.html}", note=[Accessed: 15-June-2026]}
BibLaTeX
@online{reference.wolfram_2026_closeguiobject, organization={Wolfram Research}, title={CloseGUIObject}, year={2007}, url={https://reference.wolfram.com/language/GUIKit/ref/CloseGUIObject.html}, note=[Accessed: 15-June-2026]}