In HTA applications, a simple meta tag includes visual styles:
<META HTTP-EQUIV="MSThemeCompatible" CONTENT="yes">
This trick seemed to completely disappear from Google search results, leaving this S / O question at the top!
In the case where VBScript MsgBox is the culprit, it would be necessary to modify the wscript host to use visual styles. But, for the sake of publication, you can easily create your own copy of MsgBox using an HTA file and enable visual styles. I created an exact copy in your screenshot:
msgbox.hta:
<html> <head> <title>MsgBox Title</title> <META HTTP-EQUIV="MSThemeCompatible" CONTENT="yes"> <HTA:APPLICATION ID="Custom MsgBox" APPLICATIONNAME="Custom MsgBox" BORDER="thin" BORDERSTYLE="normal" CAPTION="yes" CONTEXTMENU="no" ICON="" MAXIMIZEBUTTON="no" MINIMIZEBUTTON="no" SHOWINTASKBAR="no" SINGLEINSTANCE="no" SYSMENU="yes" SCROLL="no" WINDOWSTATE="normal"/> <script language="javascript">window.resizeTo(400,170);</script> </head> <body style="font-family:Arial;padding:20px 0 0 20px;background:rgb(180,240,230)"> <p>MsgBox Body; lorem ipsum dipsum</p><br> <div align="right"><button onclick="window.close()" style="width:80px">OK</button></div> </body> </html>
This is small enough so you can echo embed it in an hta file directly from the script package if you want.
Hope this helps!
source share