ebook img

Tutorial: Learning to Program Amos with Visual Basic PDF

14 Pages·1999·1.97 MB·English
by  
Save to my drive
Quick download
Download
Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.

Preview Tutorial: Learning to Program Amos with Visual Basic

Tutorial: Learning to Program Amos with Visual Basic Purpose You can use Amos 4.0 as a component in the computer programs you write. It is a relatively easy process because Amos lets you work in a general-purpose programming language instead of having to learn some special language. To use Amos 4.0 with your program, you need to program in a language or environment that can control automation servers, e.g., Microsoft Visual Basic, Microsoft C++, the SPSS scripting facility, SAS, DEC Visual FORTRAN or Borland Delphi1. The program that you write can carry out a single Amos analysis, or multiple Amos analyses. It can also include statements that: • specify a model • give the location of data files • select options, such as: which discrepancy function to use, whether to obtain bootstrap confidence intervals, and so on. This section demonstrates in detail how you can call Amos 4.0 from the Microsoft Visual Basic Professional Edition2, Version 5.0. It assumes that Microsoft Visual 1 At the time of this writing, there have not been any attempts to use Amos 4.0 with SAS, Visual Fortran, or Borland Delphi. Amos 4.0 User’s Guide Tutorial: Learning to Program Amos with Visual Basic • 45 Basic Professional Edition is installed on your system. The Visual Basic files for this tutorial are StartVB.vbp (VB project) and StartVB.bas (VB code). You will find both located in the Tutorial subdirectory underneath the Amos 4.0 program directory. 1. Create a new Visual Basic project First, launch Visual Basic. In the New Project window, click on the New tab and double-click on Standard EXE. 2 Microsoft offers several other Visual Basic packages with varying capabilities. Most of these can be used with Amos 4.0, but different steps may be required to reference the Amos Engine. 46 • Tutorial: Learning to Program Amos with Visual Basic Amos 4.0 User’s Guide 2. Remove Form1 If this is the first time you have used Visual Basic since its installation, the Visual Basic window will probably look something like this: Many of the elements in the Visual Basic window are useful only when you are writing a program that has a graphical interface. These elements are not needed for this tutorial, so we will get rid of them. Amos 4.0 User’s Guide Tutorial: Learning to Program Amos with Visual Basic • 47 In the Project1 window, use the right mouse button to click on Form1 (Form1) as indicated by the mouse pointer in the preceding figure. When the following pop-up menu appears, select Remove Form1: 48 • Tutorial: Learning to Program Amos with Visual Basic Amos 4.0 User’s Guide 3. Hide unnecessary windows Hide the VB toolbar by clicking the X button indicated by the mouse pointer in the following figure: Also, hide the three sub-windows titled Project - Project1, Properties - Project1, and Form Layout - Project1. (Do not hide the sub-window titled Immediate.) Amos 4.0 User’s Guide Tutorial: Learning to Program Amos with Visual Basic • 49 The resulting Visual Basic window should look like this: 50 • Tutorial: Learning to Program Amos with Visual Basic Amos 4.0 User’s Guide 4. Create a code window for your program On the menu, select Project and then Add Module: Amos 4.0 User’s Guide Tutorial: Learning to Program Amos with Visual Basic • 51 In the Add Module window, select the New tab and double-click on Module: 52 • Tutorial: Learning to Program Amos with Visual Basic Amos 4.0 User’s Guide The Visual Basic window will then look something like this: Amos 4.0 User’s Guide Tutorial: Learning to Program Amos with Visual Basic • 53 5. Tell Visual Basic how to find the Amos Engine In order to let Visual Basic know that you want to use the Amos Engine, select Project from the main menu, and then References: 54 • Tutorial: Learning to Program Amos with Visual Basic Amos 4.0 User’s Guide

Description:
Amos 4.0 User’s Guide Tutorial: Learning to Program Amos with Visual Basic • 45 Tutorial: Learning to Program Amos with Visual Basic
See more

The list of books you might like

Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.