The selling stop of 98/6/25 VisualAge for BASIC
98/6/28 All support is stopped.

It is OS/2 and is BASIC Vol 1.

(Programming by VisualAge for BASIC by the beginner)


INDEX

It leaps to OS/2 software. It leaps to a homepage. It leaps to Vol2.

Introduction
Chapter 1 Introduction of VisualAge for Basic
Now, it is a method of comrades after this.
An extended component is installed.
Chapter 2 Basic Editing of VisualAge for Basic
Like how is application made?
The start of VisualAge for Basic
I will make an easy program.
How to use an on line help
Creation of GUI application
Lesson 1: Creation of a GUI object
Lesson 2: Customize of an object
Lesson 3: Programming of behavior


Introduction


The monitor of OS/2 MAGAZIN No.16 was won and VisualAge for BASIC for OS/2 was able to be got. Thank you which only an editorial department does not make.

VisualAge for BASIC for OS/2 comes out, and I want you to also become a discount price (12,600 yen) and want a price. But since there was a memory with 26MB necessity also at the lowest when often seen, although it opted for the hard change and Hurd was upgraded, the program etc. was wavering [ whether I who know nothing use, and ] sure enough.

And there is VisualAge for BASIC for OS/2 at hand now.
I carry out so much. Why do I want VisualAge for BASIC? What is made from VisualAge for BASIC?
Shall I teach quietly? I want to make a soft OS/2 version like DDwin. DDWin The Electronic Book and EPWING agreement which are used with Electronic Book players (SONY DATA Discman etc.) It is a program for seeing CD-ROM. . With é┘é±, although he wants the translation software used by the Internet, this is not made by any means. Then, I want to make software like DDWin currently used with the Windows version. What is said is my dream. It does not understand [ whether it is also a making / software like DDWin /-from VisualAgefor BASIC corner, or ]. But let's have a dream greatly. However, probably, it will be quicker for other men to make someone previously rather than I make.
No, being [ it ]-already kana. " attached to OS/2 Warp which existed Kana-kanji conversion (WritingHeads/IM32) CD-ROM of EPWING agreement can be searched with ".

"The account of programming hard struggle" begun by such a reason. Although the point is a steep long distance, I think that he will study little by little, enjoying programming as a hobby. It is fortunate if the direction which does not know programming gets interested. Moreover, please the good more familiar one gives me advice for programming.


It leaps to INDEX.


Chapter 1 Introduction of VisualAgefor Basic


It was written that the character of VisualAge Basic as an application development language in which DB/2 (relational database of IBM) were utilized is stronger than for general programmers.
Although the sample version of DB/2 was introduced before and it excelled in it, it was different and Approach etc. and a kitchen were not able to be used. Then, it thinks that it will find out what thing is made using VisualAgeBasic, and DB / the 2 sample versions are introduced again. Moreover, multimedia, ProTAKER/2, OpenDoc, etc. are installed collectively.

Here, the capacity of a hard disk becomes less insufficient and carries out recutting a partition. It is the trouble which cannot install ProTAKER/2 installation and shortly again. This problem is also solved somehow and is introduction of VisualAgeBasic still more.


Although the introduction itself was easy, one cautions [ 2 ] were required. First, if INSTALL.EXE is started, what being introduced and the screen to choose will come out.


1.VisualAge for Basic
2. VisualAge for Basic (with DB2 Support)


It seems if DB/2 are not introduced, and "VisualAge for Basic (DB / with 2 support)" which chooses "VisualAgeBasic" is chosen, "it cannot install" here in which two choices are possible.

Moreover, when installing "VisualAge for Basic (DB / with 2 support)" and they cannot install [ the following messages can appear and ] in the direction of the last of the transmission stage of a file, please start "ODBC Installer" of DB/2, and install ODBC.


ODBC driver manager
EPFIE187: While the introductory error performed 'EXEC'EXIT routine, it generated. A return code is OX120D.


Which of "VisualAge Basic" and "VisualAge for Basic (DB / with 2 support)" or the direction to introduce is double-clicked.
Or "action" => "introduction" is chosen in the window of "introduction and maintenance", and the button of "choosing all" is clicked in a selection window. Although it did not waver since it was the same as the time of installation of DB/2, VisualAgeBasic did not have explanation of what, either.
This hit is the natural thing I want you to write even to explanation and the README file of installation, although it does not understand things.
About me, the time concerning introduction was 8 minutes and 52 seconds.


It leaps to INDEX.


Now, it is a method of comrades after this.


Although the description "before using it" currently attached to VisualAge for Basic is looked over, it does not understand well.
Although it does, if it becomes per [ programming / of "a setup of property", and behavior of "object /" ], it does not know well that form is made. the kana which he studies [ "before using it" ] little by little -- but it is likely to be bored
that is right -- since the multimedia player was created with the report which introduced VisualAge for Basic to OS/2 MAGAZIN No.16, I will make it reference and will make However, although it could make and cook, in knowing nothing, it was impossible too.
If you do not study fundamental operation of VisualAge for Basic, is it useless? But, it got to know that "the extended component for OS/2" was attached in this report. Since there was no description in a description about this "extended component for OS/2", it was saved.


It leaps to INDEX.


An extended component original with the Japanese version is installed. .


INSTALL.EXE is started from the OS2_COMP directory of CD-ROM, and all installations, VisualComponents Basic Ver1.0, and Multimedia Components Basic Ver1.0 are chosen. The rest registers the READM file of an applicable directory into reference at a tool box.


c: \vabasic\DLL\BVC3DOPT.DLL-3D option button
c: \vabasic\DLL\BVC3DGRP.DLL-3D group push button
c: \vabasic\DLL\BVC3DCMD.DLL-3D command button
c: \vabasic\DLL\BVC3DCH.DLL-3D check box
c: \vabasic\DLL\BVC3DFM.DLL-3D frame
c: \vabasic\DLL\BVC3DPN.DLL-3D panel
c: \vabasic\DLL\BVCANI.DLL-animation button
c: \vabasic\DLL\BVCCALN.DLL-calendar
c: \vabasic\DLL\BVCKEY.DLL-key status
c: \vabasic\DLL\BVCSWH.DLL-switch
c: \vabasic\DLL\BVCTICK.DLL-TIKKA
c: \vabasic\DLL\BVCPICLP.DLL-PIKUCHA clip
c: \vabasic\DLL\BVCMEMO.DLL-memorandum
c: \vabasic\DLL\BMCMMT.DLL-multimedia


Applicable .DLL is specified from "addition of a file" of the "file" menu of VisualAge Basic with é╚é╟, and it registers with a tool box.


It leaps to INDEX.


Chapter 2 The foundations of VisualAgefor Basic


Like how is application made?


  1. The start of VisualAge for Basic
  2. Creation of a user interface (form)
  3. A setup of property
  4. Programming of behavior of an object
  5. Execution of application
  6. Storage of application


It leaps to INDEX.


The start of VisualAge for Basic


To the beginning If VisualAge for Basic is opened, three windows will appear.


  1. Project (Project) The default project called untitled.prj opens, and it is used for a window in order to manage all the objects that constitute a project at the center of the project information at the time of creating application in the window which manages various kinds of modules, such as a code and form. moreover, all the VisualAge for Basic tools of the others used for developing application, a strike ADO PUROSHI jar, and a user definition function, an editor, and a browser -- also passing -- it can access from here
  2. Two RUBOTSU KUSU (Toolbox) Window which displayed the fundamental control which can be used. There is 22 control as standard and 14 control of VisualComponents Basic Ver1.0 and Multimedia Components Basic Ver1.0 can be added to others.
  3. And form The blank form of the name 1 (Form1) is displayed. It sets to VisualAgefor Basic and is form. The window used in order to design the graphical interface of the main window of user application is pointed out. In addition, windows of other kinds, such as a pop-up window for performing selection of a file and the display of a message, can also be used with application. each form -- many attributes or property -- correlation é▄é╖ Although a part of such properties are set up at the time of a design, there are some which are set up by a user's action at the time of execution. The object of others which are called component is contained in form. A text box, a command button, option buttons, etc. are some examples very much among the components which can be put on form. Although specific property is related also with each component, they are set up by the completely same method as form property. Form and a component wait for a user to take a certain action of moving the mouse which inputs a text, clicking mouse button. If these actions or an event happens, various system messages which act on a user's code will be generated. A programmer will create the code which answers these events. This code is event-driven. Although a user has to follow the path defined in advance in the conventional program, it can answer with a user and a user can control the flow of execution by the event driven program.


It leaps to INDEX.


I will make an easy program.


Creation of a user interface


The 1st step of application creation is creation of a user interface. Two and one text box are included for the command button in form.


Procedure 1 Creation of form


A start of VisualAge for Basic displays the blank form of the name of Form1 automatically. A text box and two command buttons are added to this.


  1. The button written to be "Text" of a tool box is clicked. It moves onto form and a mouse is clicked in a place to stick on. One text box written to be "Text.1" which used a default size setup is created.
  2. The button written to be "Command" of a tool box is clicked, and it moves onto form and clicks. One more command button is created horizontally [ the ] in the same way. Two command buttons written to be "Command1" and "Command2" are created.
  3. The size of a text box is changed into large size. The "text box" on form is clicked with the left button of a mouse. If a pointer is moved to one of the selection handles to which a selection handle appears around a text box, it will change to the cursor to which the arrow whose cursor is both directions was attached. Size can be changed, if it drags with the right button of a mouse pushed and mouse button is detached.
  4. Arrange movement of a component and the position of a "text box" and a "command button." It moves to an object and a "text box" to move a pointer, and a "command button", and it drags with the right button of a mouse clicked which clicks and chooses the left button of a mouse, and moves to a new position.
  5. The visual object on form is deleted. After clicking and choosing an object to delete, "edit" => "deletion" or "edit" => "cutoff" is chosen, or "Delete" or a "Ctrl"+ "X" key is pushed.


Procedure 2 Setup of a property


Next, the property of three objects (a text box, two command buttons) is set up. Such properties are set up using a property editor.
In order to access the property editor of form, form is clicked, and a "property editor" icon is clicked, or "window" > [ =] "property editor" menu item is chosen in a project window.

A property editor is also displayed as one window. It consists of a "menu bar", a "button", an "object list region", "formula mode", "status area", a "property list", a "range", etc.


Then, customize form.


Next, a text box is clicked.


The rest is two command buttons.


Procedure 3 Programming of behavior of an object


é▒é╟ writes the VisualAgefor BASIC code to each made object in a "code editor", and gives behavior to an object.


The "code editor" icon of a project window is clicked, or "window" => "a code editor" is chosen, and a "code editor" is opened. A "code editor" is displayed as one window. (Since a window opens five, do I want a big monitor?)
In a window, a "menu bar", a "tool bar", a "situation display line help region", a "navigation region", and a "code region" are located.

When a user performs specific action, it defines what occurs as a VisualAge for BAISIC code. In the case of a user program "Hello" button, when a user clicks a button, it is necessary to define what occurs. Similarly the "Bye" button and a total of two event PUROSHI jars are required.


Description of event pro SHIJI


Sub Command1_Click(
End Sub

Sub Command1_Click(
Text1.Text ="Hello programming"
End Sub

Sub Command2_Click(
Text1.Text ="Bye bye programming"
End Sub


Syntax inspection

  1. The "syntax inspection" button of a tool bar is clicked, or "debugging" > [ =] "syntax inspection" command is chosen from a menu bar.
  2. If there is an error, the drops down box of an error will appear under a code editor.
  3. Although the drops down box of an error is double-clicked, correcting indicates the error line by emphasis and it chooses a "jump" button.


Execution and a stop of application


Storage of work

Now, the program was completed. By the default, VisualAge for BASIC attaches the file extension of ".i", and keeps the form contained in application.


The end of VisualAge for BASIC

"File" => "an end" is chosen in a project window.

And such a program was made.


It leaps to INDEX.

So far, although "REXX" - "Java" was also made, it is a PUROSHI jar, property, and nonsense, and it is é┬é▄é├éóé─éóé▄é╖. If you do not study per how to use the information on an on line help, information is insufficient only at the printed matter "before using it." Although he will want to purchase if there is a good thing of the reference book of VisualAgafor BASIC, it does not see yet. It seems that the reference book of this VB can be used very well as it is although it is in large numbers if it is the reference book of VB. But do I surely want the primer of VisualAgefor BASIC to me, a beginner?


How to use an on line help


Since "Hello programming" was made to description é╟éñéΦ, it cannot be understood at all about the contents. Then, he studies about "Hellp programming" which made the on line help to the place on an errand.


1. Form Creation (Tool Box)

In form creation, if each button of a tool box is clicked and "F1" is pushed, an on line help will be displayed.


The help of the "TextBox" component


The help of the "CommandButton" component


2. Help of Setup of Property

See about the property of form by the property editor. There is no less than 42 kinds of setup. Display a help from the first line of No. 1, respectively.


BackColor


BorderStyle


Caption


ClipControls


ControlBox


DBCSStatusBar


DrawMode


DrawStyle


Even if it sees in the condition to say, he cannot understand easily. It is still more, and since it only becomes sleepy, it solves by making it this grade. Since the definition which comes out even if it sees an on line help is not understood, even if it sees an on line help, it does not understand too. Is a terminological on line help needed?
It was easy to use the direction seen in search of the word which does not understand an on line help, either by reference.

It seems that many things are actually touched and it cannot but practice until it can do automatically too. Moreover, it advances little by little, looking at a text.


It leaps to INDEX.


Creation of GUI application


Now, interactive graphical user interface (GUI) application is created shortly. This program consists of two forms for renewal of an inventory system, and a report. Data is initialized in one form and the command button which performs informational addition, edit, deletion, and storage is made in it. New data is received in another form and data is corrected to it.


In the text of VisualAge for BASIC, each item is learned using the tutorial. With the tutorial, some modules by which coding was carried out beforehand, and designed forms are prepared so that it can use to try according to a study stage. For example, even if it does not end a lesson 1, the copy of lesson2.prj is opened and a lesson 2 can be started to learn from a lesson 2. That is, the last result of a lesson 1 is contained and lesson2.prj can start a lesson 2 using it.


Here, it is a sample file. It worked having copied the x:\VABASIC\samples\tutorial\TUTOR1 directory to another work directory x:\VABASIC\takechi.


It leaps to INDEX.


Lesson 1 : Creation of a GUI object


  1. "File" "lesson1.prj" which chooses => "opening of a project" and is made beforehand is opened.
  2. In a project window, it is under "form" category. Under Form1, Form2, and a "module" category Tutor1.bas is displayed. Here, it learns using Form1.
  3. lesson1.i is double-clicked in order to display form.
  4. Some objects are contained in form. An object is further added to this form.


Two labels are created using a "Ctrl"+ click.

  1. The "Ctrl" key is kept pushed.
  2. The label component in a tool box is clicked.
  3. The "Ctrl" key is detached. Continuation addition mode begins in this procedure.
  4. A mouse is moved to form.
  5. Two different zones on form are clicked. A label appears in each one clicked position of every.


Two list boxes are created using a "Shift"+ drug.

This is another method of creating two or more same objects of type.


  1. The List component in a tool box is clicked.
  2. The "Shift" key is kept pushed.
  3. Mouse It moves to Form1.
  4. Form is clicked, and it drags on form, with mouse button pushed. The "Shift" key will be separated from mouse button if two list boxes appear.
  5. The outline of two list boxes appears. Furthermore, a grid point also appears. This point can be used as assistance in the case of positioning of the list box on form. The dialog box which whether arrangement is created asks appears.
Is List created as component arrangement?
"-- it is -- ", no [ "no" ], and "cancellation"

"No" is clicked. About component arrangement, it learns later.


A common dialog is created using a "selection" + click.

Next, the method of using it is applicable to creation of each object.


  1. "CMDialog" in a tool box is clicked. CMDialog means a common dialog component.
  2. It moves onto form and a mouse is clicked. A small icon appears.


The icon showing a common dialog serves as a mark on form. When performing application, the dialog which an operating system offers instead appears. In this application, in order to keep work, when the button "kept to a file" is clicked, a dialog appears, and although that is right, it does not understand well. About a common dialog component, since that learns and is right later, it progresses previously.


Storage of work


  1. In the outline region of a project window lesson.i is clicked.
  2. "Finishing [ selection ]" => "storage" is chosen and Form1 module (lesson1.i) is kept.


At the lesson 1, it learned about the technique for creating an object in form of a Ctrl+ click, a Shift+ drug, and a selection + click. At a lesson 2, the method of correcting and customizing the object of form is learned. To pleasure


It leaps to INDEX.


Lesson 2: Customize of an object


Change the property of the form made from the lesson 1. Although the Japanese display should have made it strain oneself well, Japanese was also displayed by changing a font.


The button of a "property editor" is clicked and the property editor of Form1 is displayed.
The property of Form1 is listed.


  1. Changing the display of the title bar of Form1 changes Caption into an inventory system. Changing the back's color changes BackColor into &H00C0C000&.
  2. Changing the character displayed on Label1 and Label2 clicks "Caption", and it inputs "explanation of an item", and "the number of an item." changing the font to be used -- "FontName" -- "MS Gothic" -- size -- "FontSize" -- "12 points" (please change an used font, when [ such ] size change may not be reflected by the kind of font used again) The color of a font changes "ForeColor" into "&HFFFFFFE5&", respectively. And a display character is arranged at the center of a frame, or right justified and carrying out left justified change by "Alignment." It changes centering into "CenterAligmnent."
  3. Next, it is customize of six Command objects. "Add" Command Button "Caption" is changed into "an addition (&A)." Here, an AMPA sand "&" is inserted before a character to make into a simple sign. An underline is attached to the character of A. The character "A" specified is pushed, pushing the "Alt" key, in order to have chosen the item. Here, "FontName", "FontSize", and "FonteColor" are not changing.
  4. Similarly, "Edit", "Delete", "Save To File", "New Report", and "Exit" are changed into "edit (&E)", "deletion (&D)", "storage (&S)", "new creation (&N)", and "an end (&X)", respectively.


It leaps to INDEX.

Change of the property of two or more objects


It can set up and the property of two or more objects can be changed, after choosing an object as a group first. Here, carry out group selection and two objects, Label1 and Label2, are changed.


  1. A pointer is moved to the zone anything is not [ a zone ] on form. A left click is carried out, it drags as it is, and the object of Label1 and Label2 is surrounded.
  2. If mouse button is detached, a handle will appear around the object of Label1 and Label2. It has chosen as a group now.
  3. The property of Label1 and Label2 is loaded to a property editor, and it can change into it.
  4. The properties which have the mark of a sign of inequality beside a property list differ in a value. Here, what can be changed in common by two objects is changed collectively. "FontName", "FontSize", "ForeColor", and "Alignment" were changed.
  5. Moreover, if the handle of not only property but one of labels is clicked and dragged, the size of both of labels can also be changed.


It leaps to INDEX.

Arrangement of a label and a list box


Arrange a list box and a label using the technique of two or more selections of property.


  1. The "List2" list box is clicked. A selection handle appears in List2.
  2. Have pushed the "Ctrl" key. Label2 (number of an item) is chosen. A selection handle is attached to a list box and a label, and a property editor is loaded for two properties.
  3. If "display" => "an equal thing is hidden" is chosen, between two objects, what [ all ] has the the same value of property will disappear, and only a different value will be expressed as a property editor. A value is marked to a sign of inequality.
  4. If the value of Left is set to 240, it will be applied to both of objects. When you set up a different value, please cancel two or more selections and set up individually.



It leaps to INDEX.


Lesson 3: Programming of behavior


It is the beginning of programming still more. Since there is a file of the sample for lesson 3, although éα is good for the first time from a continuation of a lesson 2, and it is what may use it, it advances from a continuation of a lesson 2.


Coding of event pro SHIJI for list boxes

It seems that what thing and the List1_Click event PUROSHI jar which will be performed if a user clicks by the list box somehow, although it does not understand are written even if it writes.


  1. List1 object of form is double-clicked and a code editor is opened.
  2. "Click" is chosen [ "Form1" ] for "List1" in "an event/method" with an object / "class" box in the "module" box in a code editor.
  3. And although the code of a List1 click event PUROSHI jar is inputted into a code window, a meaning is not understood at all. It is kind if this hit is explained but [ little by little ]. In a code, although the comment is written, since it is English, a meaning is not understood.
  4. The code of List1 is copied, it sticks on the code window of List2, and several places are edited.


Execution of application

"Execution" button is clicked by the project window or the code editor. Since the PUROSHI jar personally inputted since the sample program was used was a few, the program moved in this stage.



It leaps to INDEX.


It learned about the event PUROSHI jar after this, and a sample program was not used after study, such as reference of a syntax error, but the old program was made from the start. This took time.

It leaps to INDEX. It leaps to a homepage. It leaps to > Vol2.