Christian Studer 2001-05-10 07:42
Here's a VBScript example to do this. It opens 2 GIF images in Internet Explorer, the first on monitor 1, the second on monitor 2.
Internet Explorer is a special case, that's why there is a special LaunchIE function. For other applications, use the RunCmd function.
For more information on programming UltraMon, download the UltraMon SDK from the Downloads page.
Const SHOWSTATE_MAXIMIZED = 3
Set g_util = CreateObject("UltraMon.Utility")
Set g_wnd = CreateObject("UltraMon.Window")
LaunchIE "C:\WINDOWS\Desktop\top7.gif", 1
LaunchIE "C:\WINDOWS\Desktop\hotmail.gif", 2
Sub LaunchIE(file, monitor)
set IEShell = WScript.CreateObject("InternetExplorer.Application")
IEShell.Visible = TRUE
IEShell.Navigate(File)
g_wnd.HWnd = IEShell.HWnd
g_wnd.Monitor = monitor
g_wnd.ShowState = SHOWSTATE_MAXIMIZED
g_wnd.ApplyChanges 0
End Sub
Sub RunCmd(cmd, monitor, showState)
If g_util.Run(cmd) = True Then
If g_wnd.Find("", "", 0, g_util.ProcessId, 5000) = True Then
g_wnd.Monitor = monitor
g_wnd.ShowState = showState
g_wnd.ApplyChanges 0
End If
End If
End Sub
Christian Studer www.realtimesoft.com
|