Altering the look of message alert-box or .net MessageBox

Posted by tbergman on 18-Aug-2017 06:34

I noticed a recent kbase stating that it was not possible to alter the font, size etc. of a message box. This is not strictly true. There's a .net dll available at http://www.news2news.com/vfp/?solution=5 that works in Progress. You just need to run some progress code that loads and configures it and all subsequent message boxes throughout the Progress session will have the new styling.

This in not a free tool. It looks like they're charging $50 for it now. I have no connections with the developer, I'm just a user. 

Here's some sample code I use for presentations.

USING XMsgLib.Dlg.*.

DlgMgr:AssignMessageFont("Arial", 16, 0, 0, 0, 0, 0).
DlgMgr:UdfBackcolorsEnabled = TRUE.
DlgMgr:LoadBackColorFromSolidColor(XMessageBoxBackground:DlgWindow,
  System.Drawing.Color:FromArgb(-1)).
  DlgMgr:LoadBackColorFromSolidColor(XMessageBoxBackground:ToolBarWindow,
  System.Drawing.Color:FromArgb(-4144960)). 
DlgMgr:AssignDlgMaxSize(900, 0).
DlgMgr:AssignDlgPosition(XMessageBoxHorizontalAlign:RightAligned, 
  XMessageBoxVerticalAlign:Centered).
DlgMgr:DlgMonitorEnabled = TRUE.

All Replies

Posted by Brian K. Maher on 18-Aug-2017 06:38

Hi Tom,
 
Very cool stuff.  Do you remember the KBase title / number?  I would like to update it with this info.
 
Brian

Posted by Brian K. Maher on 18-Aug-2017 06:46

Thanks

This thread is closed