# Close a %frame programatically

**URL:** <https://racket.discourse.group/t/close-a-frame-programatically/4019>\
**Category:** Questions & Answers\
**Tags:** question, gui, frame, close\
**Created:** [November 22, 2025, 12:40pm UTC](https://racket.discourse.group/t/close-a-frame-programatically/4019 "2025-11-22T12:40:43Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![hendrikboom3](https://yyz2.discourse-cdn.com/free1/user_avatar/racket.discourse.group/hendrikboom3/32/2748_2.png) [@hendrikboom3](https://racket.discourse.group/u/hendrikboom3)\
**Post date:** [November 22, 2025, 12:40pm UTC](https://racket.discourse.group/t/close-a-frame-programatically/4019/1 "2025-11-22T12:40:43Z")

</div>

How do I close a top-level %frame?  
Of course I can click on the close button the OS provides me at the top right corner.  
But what if the program I am running wants to initiate the close without user involvement? And then go on running doing other things that do not involve the %frame?  
I'm running all this in DrRacket on Devuan Linux.  
-- hendrik

---

<div class="post-metadata">

**Author:** ![jjsimpso](https://yyz2.discourse-cdn.com/free1/user_avatar/racket.discourse.group/jjsimpso/32/602_2.png) [@jjsimpso](https://racket.discourse.group/u/jjsimpso)\
**Post date:** [November 22, 2025, 4:11pm UTC](https://racket.discourse.group/t/close-a-frame-programatically/4019/2 "2025-11-22T16:11:00Z")

</div>

Is it enough to hide the window instead of closing it? You can use `(send a-window show #f'` to hide it.
