# MessageDialog in window

**URL:** <https://forum.xojo.com/t/messagedialog-in-window/87616>\
**Category:** Windows\
**Created:** [February 2, 2026, 3:31pm UTC](https://forum.xojo.com/t/messagedialog-in-window/87616 "2026-02-02T15:31:53Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Volbragt\_Etienne](https://forum.xojo.com/user_avatar/forum.xojo.com/volbragt_etienne/32/6530_2.png) [@Volbragt\_Etienne](https://forum.xojo.com/u/Volbragt_Etienne)\
**Post date:** [February 2, 2026, 3:31pm UTC](https://forum.xojo.com/t/messagedialog-in-window/87616/1 "2026-02-02T15:31:53Z")

</div>

Windows 11, XOJO 25r3.  
I have a app that opens another window (movable window).  
In that window there will be a call to a MessageDialog.  
How can I make sure that the MessageDialog will be inside that window.

Thanks

Regards

Etienne

---

<div class="post-metadata">

**Author:** ![Tim\_Parnell](https://forum.xojo.com/user_avatar/forum.xojo.com/tim_parnell/32/161_2.png) [@Tim\_Parnell](https://forum.xojo.com/u/Tim_Parnell)\
**Post date:** [February 2, 2026, 3:56pm UTC](https://forum.xojo.com/t/messagedialog-in-window/87616/2 "2026-02-02T15:56:20Z")

</div>

Windows doesn’t have the concept of a “MessageDialog within a Window” the way macOS does. The Xojo framework can only show the MessageDialog modally for the whole application on Windows.

I _thiiiiiink_ you can use declares to position the dialog or even attach it to the parent window _“in a type of way”_; but it’s not the same framework-level `ShowModalWithin` feature.

All that said, you can use the cross-platform “within” functionality, they’ve just made it an undocumented signature of `MessageDialog.ShowModal(withinParent as DesktopWindow)` now. This will correctly show up within the Window on macOS and will be globally modal on Windows (the best it can do).

If you’re looking for something better than that, I do not have an answer for you sorry ☹

---

<div class="post-metadata">

**Author:** ![DetlefK](https://forum.xojo.com/user_avatar/forum.xojo.com/detlefk/32/23653_2.png) [@DetlefK](https://forum.xojo.com/u/DetlefK)\
**Post date:** [February 2, 2026, 5:05pm UTC](https://forum.xojo.com/t/messagedialog-in-window/87616/3 "2026-02-02T17:05:57Z")

</div>

> [@Tim\_Parnell](#):
>
> All that said, you can use the cross-platform “within” functionality, they’ve just made it an undocumented signature of `MessageDialog.ShowModal(withinParent as DesktopWindow)` now. This will correctly show up within the Window on macOS and will be globally modal on Windows (the best it can do).

Me, must look into this. This is very interesting.

---

<div class="post-metadata">

**Author:** ![Volbragt\_Etienne](https://forum.xojo.com/user_avatar/forum.xojo.com/volbragt_etienne/32/6530_2.png) [@Volbragt\_Etienne](https://forum.xojo.com/u/Volbragt_Etienne)\
**Post date:** [February 2, 2026, 5:17pm UTC](https://forum.xojo.com/t/messagedialog-in-window/87616/4 "2026-02-02T17:17:46Z")

</div>

@Tim,  
Thank you very much for the reply.  
I will check it.

@DetlefK,  
Whenever you find a better solution, please let me know.

Regards  
Etienne

---

<div class="post-metadata">

**Author:** ![MarkusR](https://forum.xojo.com/user_avatar/forum.xojo.com/markusr/32/685_2.png) [@MarkusR](https://forum.xojo.com/u/MarkusR)\
**Post date:** [February 2, 2026, 7:30pm UTC](https://forum.xojo.com/t/messagedialog-in-window/87616/5 "2026-02-02T19:30:36Z")

</div>

(Xojo 2025r2.1)  
its maybe the parent but it does not change the position

i think you need to create your own dialog window  
it would be open

```auto
var w as new MyDialogWindow
w.Left=self.Left
w.Top=self.Top
w.InitSomething
w.ShowModal 
memory the button / return value in this dialog window and hide it
read public property or call a method in w. here
w.close

```
