Dialog box Decoration property setting has no effect at runtime

As far as I’ve understood, when you set the property value With Title Bar to No the Title Bar (nor the X) shouldn’t appear when loading the Dialog. If you select No in design mode the Dialog is seen without the bar, but it seems that the setting is ignored at runtime as well as if you check it in the preview window.

This has no affect either:

    With myMsgDialog.Model
        .PositionX = (factor * oWindowPosSize.Width - .Width) / 2
        .PositionY = (factor * oWindowPosSize.Height - .Height) / 2
        .setPropertyValue("Decoration", False) 'Switching between False/True has no affect 
    End With

I don’t care if X works or not, I’m looking for a way to completely avoid the Title Bar from appearing.

Please upload ODT with example dialog and macro.

TestMsgDialog.odt (11.5 KB)

Unfortunately I didn’t discover the solution :-(.
Maybe the Popup window could help sometimes:

Sub showPopupWindow
	dim oDoc as object, oWindow as object, oVCur as object
	dim aRect as new com.sun.star.awt.Rectangle, oPopup as object, n&, c&
	oDoc=ThisComponent
	oWindow=oDoc.CurrentController.Frame.ComponentWindow
	oVCur=oDoc.CurrentController.ViewCursor 'view cursor

	aRect.X=400
	aRect.Y=100
	
	oPopup=CreateUnoService("stardiv.vcl.PopupMenu") 'or com.sun.star.awt.PopupMenu
	c=1
	oPopup.insertItem(c, "blabla 1", 0, c)
	oPopup.setCommand(c, "item" & c)
	c=2
	oPopup.insertItem(c, "blabla 2", 0, c)
	oPopup.setCommand(c, "item" & c)	

	n=oPopup.execute(oWindow, aRect, com.sun.star.awt.PopupMenuDirection.EXECUTE_DEFAULT)
	if n>0 then 
		msgbox oPopup.getCommand(n)
	end if
End Sub

@KamilLanda

Thank you for your answer.
The PopupWindow you suggested would be perfect if I could handle it the same way I do with my Dialog, i.e. I could show the box without executing and then hide and destroy it when the Wait time has elapsed.

myMsgDialog.setVisible(True)
Wait 2000
myMsgDialog.setVisible(False)
myMsgDialog.Dispose()
ThisComponent.setModified(False)

Works fine under Windows!
Sans titre

@LibreOfficiant
Yes it works when using a Standard Dialog, but you can’t hide the Title Bar, at least I can’t do it (at least yet)