Mike Gagnon
Programmer
Try a new style messagebox that is more flexible, can be positionned anywhere, you can change the font, the background color, add buttons etc.
Mike Gagnon
If you want to get the best response to a question, please check out FAQ184-2483 first.
Code:
objShell = CreateObject("WScript.Shell")
Declare Sleep In kernel32 Integer dwMilliseconds
objIE = Createobject("InternetExplorer.Application")
strIETitle ="Message box"
strMsg ="This is my new style message box"
With objIE
.Toolbar = .F.
.StatusBar = .F.
.Resizable = .F.
.Navigate("about:blank")
With .Document
With .ParentWindow
intWidth = .Screen.AvailWidth
intHeight = .Screen.AvailHeight
intWidthW = .Screen.AvailWidth * .40
intHeightW = .Screen.AvailHeight * .05
.resizeto(300,200)
.moveto( (.Screen.AvailWidth)/6, (.Screen.AvailHeight)/6)
Endwith
.Write( "<body> " + strMsg + " </body></html>")
With .ParentWindow.Document.body
.Style.backgroundcolor = "LightBlue"
.Scroll="no"
.Style.Font = "20pt 'Arial'"
.Style.BorderStyle = "outset"
.Style.BorderWidth = "4px"
Endwith
.Title = strIETitle
=Sleep(100)
objShell.AppActivate(strIETitle)
Endwith
Endwith
objIE.Visible = .T.
Mike Gagnon
If you want to get the best response to a question, please check out FAQ184-2483 first.