Click here to Skip to main content
Click here to Skip to main content

Use an Internet Explorer Window to Display Information from your VB Scripts

, 17 Aug 2007 CPOL
Rate this:
Please Sign up or sign in to vote.
This class allows you to display all types of static and dynamic information gathered in a VB Script using an Internet Explorer Window.

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.

Screenshot - Sample.jpg

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:

// 'Create our IE window to output info from our script to
Dim ScriptUpdateWindow
Set ScriptUpdateWindow = new IEDisplay

Then set the four properties BEFORE calling the .Show method:

ScriptUpdateWindow.WindowTitle = "Jake's IE Display Class" 'Default is blank
ScriptUpdateWindow.InitialText = "Loading Please wait..." 'Default is blank
ScriptUpdateWindow.NumberOfLabels = 2 'default of 1, max of 5
ScriptUpdateWindow.Horizontal_Vertical_Labels = _
                            "vertical" 'default of "horizontal"

Now call the .show method and the Window is available to display information to:

'Call the .show method to make the IE window appear
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 '(The label Number)
ScriptUpdateWindow.AppendText "StringText Set To Append In Label" + _
                                IP,1 '(The label Number)

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

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Share

About the Author

nieljake

United States United States
No Biography provided

Comments and Discussions

 
GeneralMy vote of 4 Pinmemberemacs7324-Sep-10 0:05 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

| Advertise | Privacy | Terms of Use | Mobile
Web02 | 2.8.141216.1 | Last Updated 17 Aug 2007
Article Copyright 2007 by nieljake
Everything else Copyright © CodeProject, 1999-2014
Layout: fixed | fluid