Quote:
> I want to display a popup message box that will only be displayed
> for a couple of seconds with an informational message. Is it
> possible to display this without any buttons, by default if I
> specify nothing in the display button option I always get an "OK"
> button as follows....
> Set ObjWshShell = WScript.CreateObject("WScript.Shell")
> ObjWshShell.Popup strMsg, 2, strTitle, 64
> Many thanks
> David
AFAIK, you either need a third party control (no recommendation) or you
need to 'roll your own'. Here's one example, using IE's controls ...
' Modeless.vbs - An example of using IE to create a modeless
' message box.
' Tom Lavedas
set oIE = CreateObject("InternetExplorer.Application")
Modeless oIE, "This is an important message!" ' Launch the window
'
' Do something. For example, ...
'
With CreateObject("Wscript.Shell")
for i = 1 to 5 : .Popup "Count:" & i, 2, "Test" : next
End With
'
on error resume next ' in case the Task Manager is used to close IE.
oIE.quit ' Close the modeless message box
Sub Modeless(oIE, sPrompt)
With oIE
.fullscreen = True : .navigate "about:blank"
While .readystate <> 4 : wscript.sleep 100 : Wend
With .document
.title = "Message _________________________________"
.ParentWindow.resizeto 400,100
.ParentWindow.moveto (.screen.width - 400)\2, _
(.screen.height - 300)\2
.write "<body bgcolor=Silver><table width=100% height=100%>" _
& "<tr><td valign=middle align=center>" _
& "<h3>" & sPrompt & "</h3></td></tr></table></body>"
.body.style.borderStyle = "outset"
.body.style.borderWidth = "4px"
.body.scroll = "no"
End With
.visible = true
End With
End Sub
Tom Lavedas
-----------
http://www.pressroom.com/~tglbatch/