Introduction
Time and time again for my job I needed to be able to display dynamic/updating information about our PACS system. Using a VB Script and this class, I was able to create the example below. This example would gather information from our database every 15 seconds and then update the Window. Since then I have found so many other uses for this class. So I thought I would share it with everyone.
Background
This article explains how to use the IEDisplay
class, and does not go into the functioning of the class code itself.
Using the code
First you need to copy the contents of the class located in the file IEDisplay_Class_Only.txt and paste it in your VB Script.
The next thing is to create an instance of the class in your VB Script:
//
Dim ScriptUpdateWindow
Set ScriptUpdateWindow = new IEDisplay
Then set the four properties BEFORE calling the .Show
method:
ScriptUpdateWindow.WindowTitle = "Jake's IE Display Class"
ScriptUpdateWindow.InitialText = "Loading Please wait..."
ScriptUpdateWindow.NumberOfLabels = 2
ScriptUpdateWindow.Horizontal_Vertical_Labels = _
"vertical"
Now call the .show
method and the Window is available to display information to:
ScriptUpdateWindow.Show()
There are two ways to add data to the IE window. Using the .SetText
or .AppendText
methods.
ScriptUpdateWindow.SetText "StringText Set To Display In Label",_
1
ScriptUpdateWindow.AppendText "StringText Set To Append In Label" + _
IP,1
Points of Interest
See the VBScript examples provided with the zip file. These examples show all of the available methods of the class and how to use all the features. The comments through the code should answer any questions on how to use this properly.
History
- Version 1.0: Submitted on 17-Aug-2007