ITE 285 - WINDOWS programming (and MAYBE some scripting) Most of the scripting will be put off until the fall. We're emphacizing aspects of windows programming. We now have a graphical windows interface, and it's now an object oriented environment. Current Version: 5.0 [PROFESSIONAL EDITION] [Labs will run 5.0] (bookstore sells version 6.0) 1/13/99 ======= Topics: Windows-based programming fundamentals Visual basic programming fundamentals Intermediate HL (High - Level) programming concepts - We'll work with strings, arrays, file objects, et cetera. Windows GUI Design Principals Human Interface class (Dr. Owen) covers this pretty deeply. Windows based debugging Software Development Standards Why do we do this? Why is it important? Why are there even standards? Learning a new language. Techniques and stratigies. First Topic: A program development cycle for RAD - [Rapid Application Development] Idea behind RAD - You should be able to develop applications quickly. includes RAPID PROTOTYPING. (more of a scaled down, rudimentery version of your final product). Then, you present it as a prototype and get feedback from your clients / users. You don't want to go way down months of work , scrap that , and step backwards. Program Development Cycle for RAD ================================= 1) Analyze - [understand problem / analyze problem / get requirements] 2) Design 3) Choose the interface 4) Code [translating pseudocode to computer instructions, et cetera...] 5) Test and Debug 6) Document 7) Go BACK to step one. ...you'll never actually see these out of order... ...Test and Debug throughout the process... When you go back, you're taking another piece of the problem. You code small parts of the problem to eventually reach a large solution. Steps 3-5 are even their own repeatitive cycle. Then... you've got the VISUAL BASIC PROGRAMMING CYCLE: 1) Creating a form - Basically the menu or the interface. it's a window at runtime. All of the visual objects are placed on the form. 2) Adding controls on a form - objects like command buttons you click on or a text box where the user types in information. You've also got check boxes, radio buttons, et cetera. 3) Setting Properties - attributes of objects ; aspects of data - font size, color, et cetera. 4) Writing Code - event procedures and user defined proceedures. This life cycle more or less breaks down steps three and four of the Program Development lifecycle for RAD. EVENTS are the user actions. They're initiated by clicking a button, pressing a key on the keyboard. They can also come from the system, such as an elapsed time, et cetera. PROCEEDURES vs MODULES. Visual Basic refers to proceedures because modules are generally explained as files. Examples: Type of code where to define example interface event proceedured getting input data and related displaying a result non-interface user-defined proceedures calculating a computed related result interface related code - deals with getting info from the user and displaying a result. mostly for input / output. INTRODUCTION TO OBJECTS / FORMS / CONTROLS: Terms: object, property, method, event, event proceedure, form control. A form is a user object that is the basis of the user interface. At runtime, it's a window. Common Controls: command button, text box, and labels. Others: Listbox, Combobox, timer, picture box, check box, option (radio) buttons, frame. data control. FOCUS - is the location of the input when you start a program. If you start a program trying to type, and you hear blinks and nothing appears, the text box does not have the focus. LABEL - static text before a text entry field which provides information. What is an object? - it's a basic element of a VB program. Objects contain properties, methods, and events. the form has properties, methods, events, ex cetera. *** Objects contain properties, methods, and events. Properties can be changed both at run time and at design time. form1.caption = "Main Menu" A form has a caption. Caption is usually left justified. In this statement, the "=" is the assignment operator. object.property=value ? - data type associated with it. form1 is the name of a particular form. caption is the name. form1.visible=True. visible is a property. you don't do this is quotes, though. Combo1.style=2 - name of a combo box control. a combo box is like a text box with -- it's a listbox. listbox and combobox are very similar (in vb) Command1.caption = "&Quit" - & underlines Q. Form2.Show Text1.SetFocus general structure in an event proceedure: events: Sub Command1-click() End Sub 1/20/99 ======= general structure in an event proceedure: events: Sub objectname-event() statements End Sub example: events: Sub Command1-click() End Sub click() - the click event. you have FUNCTIONS and SUB-ROUTINES. What is the difference between a function and a sub-routine? Functions return a value. Proceedures do not return a value, except through a value. What is event driven programming? - Characteristics of Event-Driven Programming: There are multiple input points. There are very interactive interfaces. An application waits for an event to occur before taking any action. The user, rather than the programmer, "drives' the application. It's relatively difficult to trace code. Terms: IDE - Intergrated Development Environment. The environment VB used. It's very visual, it's very interactive. In this environment, you have the capability to do everything you want in the development including visual tools, writing code, test and debug, et cetera. VB Project - Your program and all of its files (at design time). There are several types of files: File: Extension: Example: project: .vbp project1.vbp (also has properties) form module: .frm form1.frm, fMain.frm code modules: .bas (only code, no properties, no interface) once done. we compile and make payroll.exe for the user. 1/25/99 ======= Immediate Window - we'll talk about when we get programs running in the IDE. Common Controls: ================ Command Button - cmd - cmdMainMenu Label - Labelorlbl - Label1 or lblResult (depending on if you code with this or not) Text Box - txt - txtAddress List Box - lst - LstClassification Combo Box - cbo - cboMajors Option (radio) buttons - opt - optMale Check Box - chk - chkMarried Frame - Frame1 or fra - fraGender (depending on if you code with this or not) When clicking on an object for the code window, which two items determine the event? object name event you're writing the code for Visual Basic is both a compiled AND intreprited language. My adhering to this convention, Visual basic has a set of rules for naming -- it must start with a letter. We want to adhere to the naming PREFIX which reflects the type of code, however. Also, by using cmd instead of "mainmenubutton", all the cmd's are listed together in alphabetical order. Quiz Answers: Why would we keep the interface code seperate from non-interface code? reusability. Do the Click Event: Sub cmdPrint_Click() End Sub *** Objects contain properties, methods, and events. 1/27/99 ======= Compiled vs Intreprited Compiled runs faster (because an extra step is taken out) Compiled ALSO takes up more space. We have disabled the save feature, then, in code: if txtName.text = "" Then Let cmdSave.Enabled=False else Let cmdSave.Enabled=True End if (txtname = > Change) To reset name and have the field automatically be selected when I switch the focus to that event: txtName - gotFocus txtName.SelStart = 0 txtName.SelLength = Len (txtName) (how many chars to be selected?) 1/29/99 ======= Topics for today: Data types for variables Constants to replace literals Creating variables Variable Scoping naming variables user=defined type example Data types: Integer : Integer (-34,768 - 32,767) Long (-2.147 billion - 2.147 billion) Floating Point: Single - 1.4012e (-45) - 3.4028e (38) Double - 4.94065e(-324) - 1.79796e (308) Currency - 922.337 trillion String - up to 65,500 characters Variant - Any time above plus dates User Defined - Composed of collections of individual data Dim used to stand for Diminsioning in an array. (declares a varaible) Dim X& - declares for a long variable Dim I% - integer variable dim i$ as string ? either / or -- go with the character, or as the AS clause. page 170 in the book - table of type characters. use sign mostly, becuase you automatically know what it is throughout the code. __MUST__ use option explicit. Dim simply declares one Private and public are access words, yet, they do NOT reference DIM. :) declare data types and variables in the (general) section option explicit also goes under general. static - when it creates something new, if the variable was previously available and used, the new value will be what the previous value was. PayRate or Pay_Rate (both supported) in this class Dim Name$ Let Name$ = txtFirst.Text & " " & txt.Last.Text if you did "txtFirst.Text" - it would put THAT in as the varaible! some operators: + - * / = < > > < >= <= AND OR NOT operator presedence: not followed by and followed by or sub command1_click() - for accessing click event let object.property = value (must have type compatability) KNOW PROPERTIES, EVENTS, METHODS!! 2/1/99 ====== Response = MsgBox("Invalid Input.", _ vbExplanation, "Error") the _ will move the Error to the next line. Invalid Input. Error. (don't forget the space before the underscore) If you don't have the option explicit enabled, the system will CREATE a variable for you (which is most likely not what you wanted to do) OPTION EXPLICIT - checks to be sure all of your variables exist. Example of code: Dim Grade% Select Case Grade% Case is => 90 LtrGrade$="A" Case is > 80 to 89 (using a range) LtrGrade$="B" Case is > 70 LtrGrade$="C" End Select While ...condition... (statements) Wend vb is very similar to batch files. :) (with comments, et cetera) (rem = remark) (' is a comment) Subroutines must return values using the parameter list. sub as opposed to endsub functions Under (General) - (Declarations) function DollarsToFrancs (Dollars As Currency) As Currency (second one refers to the returnable variable?) Const ConvertRate as Single = 0.1766 Let DollarsToFrancs = Dollars * ConvertRate Private Sub Form_Load() End Sub now....to call this... CmdConvert - Private Sub cmdConvert_Click() let lblresult.Caption=dollarstofrancs(txtDollars) End Sub exam - next friday [the 12th] 2/5/99 ====== Which of the following is a true statement about comments? (a) you do them at the end (b) no one reads them anyway (c) do it only if the instructor tells you to (d) always comment as you go <<<--- What specifically should you comment in a program? What the proceedures are doing (asked for name on assignment, in code, and on interface) Grading programs - everything is like...a deduction. You fall in the habit of everything is good, so points come off... there is an innovation "bonus" - ;-) Variable Identification with meaningful names is/are good. Everytime you declare a variable, comment it inline code (what is that block of code doing?) access keys on the command buttons are good coding style is good (also - put controls in frames...looks better) shouldn't really have the height of the textbox larger than the test entry 2/8/99 ====== FormA.frm Option Explicit public dbname As String l* of db file [another scope of dbname] private i% sub cmdOpen_Click() static dbname AsString -->> static would remember the last value Let I% = 10 [one scope of "dbname"] Let dbName = "A:\employee.mdb" End Sub [assume code has been loaded at least once...] (private is going to keep that value to form a) (could be "dim", or private or public) generally just use PUBLIC. ;-) FormB.frm sub cmdDisplay_Click() FormB.Caption="Database: " _ [_ = line continuation] & Forma.DbName [& concatanation] FormB.Print I& End Sub this I% is going to be considered new, since it does not show up seperately. on test... write some type of proceedure trace variables through if there is a code that calls a proceedure, can you actually trace the code / variable and see what happens? 2/10/99 ======= Dim I As Integer 'get three quiz grades Quiz1 = GetGrade ("Quiz1") pctDisplay.Print ("Quiz 1 Grade = " & Quiz1) Quiz2 = GetGrade ("Quiz1") pctDisplay.Print ("Quiz 2 Grade = " & Quiz2) Quiz3 = GetGrade ("Quiz3") pctDisplay.Print ("Quiz 3 Grade = " & Quiz3) do we need these variables outside? Function GetGrade (QuizNumber as String) as single (becuase we return one value?) getgrade = inputbox ("Enter the grade for " & quiznumber, "Quiz Grade Entries", 10 nice...used a textbox... End Function computeaverage - function, needs to be seperate from interface. when you do this, sub ComputeCost (price as single, tax as single) as single the last "as single" is actually the RETURN TYPE. (single is a float) cmdCompute.SetFocus ;-) - use this =) ++ON TEST++ function returns a value - use this when you write a proceedure that returns one output and gets any number of inputs. you don't necessarily have to have a seterate varabile to hold the result. can you list the steps of the SDLC? How can VB help make the sdlc work faster? (for rapi application development) What are objects? what are properties? methods? events? what are the differences? what are the controls we've studied? what are their differences? what are the approphriate controls to use for different situations? mutually exclusive - only select one. combo box - can add things off the list event driven programming - True or false - each user action invokes only one event? FALSE. (could set focus, click event, et cetera) textbox.setfocus (kept focus there)... this almost created a loop. 2 things displayed in the code window - object and event. an object and an event make up an event proceedure. TxtCity - if it lot its focus , what do I have to code? Sub TxtCity_LostFocus() TxtCity.LostFocus End Sub Compiled? Intreprited code? common visual controls - command box, labels, frame, et cetera. txtCity.Text="Mobile" |--it's a property. CboClass.AddItem "Freshman" - a method. there's nothing being assigned. Picout.Print "Some string output" -- same thing. static MUST BE local scope. :) static remembers value next time something is initialized. if statement? case statement? you MUST say AS INTEGER.. everywhere. Event Proceedure: Sub txtCity_Click() ...event.... end Sub percent - integer $ - string What does mutually exclusive mean in reference to option buttons? how can you make a control become unresposive to user actions (enabled=false) [==end of test one==] test 1 = 76 2/15/99 ======= in comparing strings, you compare based on their ascii values example: "100" is less than "2" ;-( string functions: convert strings strconv, val, str convert lower, upper lcase, ucase create string of repeating characters space, string find length of string len format a string format justify a string lset, rset manipulate strings left, mid, right, trim, ltrim, rtrim search for a substring instr return the ascii of a string asc returns the string of an ascii value char Dim Num1$, Num2$, Sum$ Let Num1$="2" Let Num2$="100" Let Sum$="Num1 plus Num2 is: " & Str (Val(Num1$)+Val(Num2$) rem val takes string and makes it a number rem we have a string variable, we must first convert the strings to the number, add them together, then convert them back to a string for the concatination. Let Mm$=str(num$) let nim%=val(num$) Let txtResult = txtNum1 + txtNum2.Text this could cause an error considering this could be string concatination. (type mismatch?) so, lets re-write. ;-) Let txtResult.text = str(val(txtNum1.Text) + val (txtNum2.Text) assigns 10.5 (or whatever the value is) to a string. Let txtTemp.Text = "32" & Chr(176) & "Fehrenheit" actually allows the degree symbol to appear =) StrConv - requires two perameters -- the string to convert, and the conversion code. StrConv ("John Doe"), vbProperCase) (or vblowercase, vbuppercase) Space (3) - returns "___" - 3 spaces String basically repeats whatever you give it. Format (1234.5, "Currency") - $1,234.50 why is it in quotes? could put long date, short date, et cetera... converts "000" or "055-14-2299" or "55142299" (social security?) Manipulate Strings - such as Left, Mid, Right, Trim, et cetera... will trim spaces off the front or back...et cetera... Instra ("Mobile"), "1" - might show 3? 2/17/99 ======= From one test: Suppose you wanted to know what happened, event wise, if you double-clicked on a text box. Possibly, a DblClick event would occur. Or, perhaps, a Click event followed by a DblClick event. Another possibility would be that a DblClick event followed by a Click event would occur. Write a short, brief Visual basic program that would prove which of the above would actually occur. For simplicity, you may write output to a picture box named PicOut as follows: picOut.Print "some string output". Be sure to briefly explain how your program works: Sub Text1_click() picOut.Print (Click) End Sub Sub Text1_DblClick() picOut.Print "Double Click" End Sub 2/19/99 ======= Multi-line text Carriage return and line feed -- special characters CR is 13 in ASCII, LF is 10 and space is 32 When you are doing a word count, you need to look for the CRLF SEQUENTIAL DATA FILES Basic terms: file, data file, program file, dirve leter, root, folder, directory, filespec, path, extension, backslash Example of a filespec: A:\Visual Basic\Data\MyFile.txt extensions tell you the type of file; you can use more than 3 letters, but we still use the convention txt files are the easiest because they are only ASCII Related to files Terms: open, close, read, write, append, end-of-file, carriage return, line feed, delimiter, sparator, records, fields sequential file: -stored on a disk as a sequence of characters -2 special characters: CR/LF -- signifies the end of a line -used by text editors, like Notepad -ASCII files with sequential files, you can have variable length records (the line of the file can have variable lengths) if we were to store the info from the text box into a file: each line would be of a different length In VB, we really mean an ASCII, but there is an additional level of structure -there is a difference between text and numbers "Joe Jones", 10.50, 35 --> these are 3 different data elements the comma is the separator character delimiters mark the beginning and ending of data (the quotation marks) will format these into records and fields Ex: an employee file name, pay rate, hours worked "Joe Jones" , 10.50, 35 "Mary Smith", 11.00, 40 the structure for each is the same, but the line lengths are different point: we are going to manipulate data in stored files -read, write, store, etc. 2/22/99 ======= 1. Find -> don't search for whole words 2. don't use the "rich text box" feature, pulls away from what we learn. 3. Case Matters don't forget.... while not EOF statements if cond then statement two end if wend Details - turned in materials, et cetera....... now......Friday.......we were discussing sequential files. Operations we can perform on sequential files: -opening for input -reading data -closing -checking for end of file -opening for output (creating) -writing data to files -opening for an append -renaming a file -deleting a file -deleting data from a file -checking for existance of a file -sorting, searching, and merging opening a file for input: ------------------------- open "filespec" for input as #n open "a:\myfile.txt" for input as #1 [number uniquely id with that file] for input initiates communication between VB and a file. obviously if we open a 2nd file, we'll use #2 instead of #1. if it does not find the file...it'll generate an error and produce a runtime crash. reading from a file ------------------- input #1, var (example - input#1, name$, age%) must have a match for a correct match. "Al Anderson", "10.00", 45 "Betty Baker", 11.50, 40 "Cathy Carter", 9.75, 20 closing files ============= close #n close #1 checking for end of file ======================== eof (N) , eof (1) -- returns true or false might use a: do while not eof (1) input #1, et cetera... opening a file for output ========================= open "mydata.txt" for output as #1 appending a file for output ========================= open "mydata.txt" for append as #1 writing data ============ write #1, "John Smith", 40 (will write one whole line and carriage return it) also - write #1, "John", 50, 10*Num% might write : "John", 50, 20 renaming a file =============== name "filespec" as "filespec2" name "a:\payroll.dat" as "C:\pay.txt" will "move" the file. if the file is open, you will get a "file already open error" deleteing data ============== open file for reading open tempfile for output while not eof (old file) input data from oldfile if data is not to be deleted then write data to tempfile end if end while close oldfile close tempfile delete oldfile rename tempfile to oldfile sequential file ADVANTAGES ========================== very easy to create and use! ascii standard efficent use of diskspace disadvantages to sequential files ================================= to locate an item, you must read everything before it deleteing , sorting, inserting, and difficult 2/26/99 ======= Random Access Files (See VB Code: 2-26-99 Class code.vbp) Fixed length Strings Declaration -> dim VariableName as String * N n = String lenghth · When assignment is made String will pad with spaces or concatenate to fit lenghth · Comparisons will not work the way you think between fixed length and normal strings because of extra spaces · Use the trim function to get rid of extra spaces for comparisons · Direct access files · Can read and write to them at the same time Important functions lof -> length of file Gives the total number of bytes in a random access file loc -> returns the location of the pointer in the file if you divide the lof value by the number of bytes in a file, it should give you the number of records. Advantages: · Faster searches Disadvantages: · Takes more space on disk · More difficult to create and maintain 3/1/99 ====== Mobile......(CR) (CR) (CR) (CR) (CR) Alabama Word Count: 2 Chars (no spaces): 13 Chars (with spaces): 22-32 turn in disk, printout, coversheet on test... what are the advantages of using sequential files what are disadvantages? what are the advantages of using random-access files what are disadvantages? code an EOF [while not EOF] public keyword gives it access to the entire project. can you write a statement to read record # 5 ? EOF = end of file sequential ONLY! get #2, 1, var - reads and writes random files? Len ? Val ? Str ? insta or mid strconv /?! test 2 = 65 (actually, 66) 3/15/99 ======= visual basic forms hide - makes form information invisible to user Sub Main () - would load on the startup form (or in place of the startup form) 'me' - whatever form is the DEFAULT form. fedit.Visible = True - displays form to the user. Generally, you need to load it first. :) fedit.show - will load it AND show it fedit.hide - should just make it invisible vsyesno+vbmodal - makes the user respond to it before ANYTHING else happens. closed will mean unloaded OR hidden fEdit.Show vbModal form_activate - might set the active focus on a textbox or something. runs immediatey after form appears on the screen [which is done with form_load] vb end statement - will NOT unload the form!! 3/17/99 ======= Window State - Min Max Sizable these are all window "state" properties which control the control boxes, et cetera. Fixed Single - you can't resize it. The timer control executes code at a specific time interval. Code could execute every 3 seconds for example [useful for updating the screen for information on a periodic basis] Interval property in timer - in milliseconds. get a copy of timer.frm ;) [vb was not working] 3/22/99 ======= drive1 - change Private Sub Drive1_Change() Dir1.Path=Drive1.Drive End Sub when working with the controls, this allows the drive letter to go with the drive path. For adding custom controls, you go to projects, components. [ocx files] prebuilt form for opening a file, save as, et cetera... cdl - common dialog Assignment: chk # payee amt cleared ====== ====== === ======= 100 Ala Power 75.10 no 101 ComCast 45.00 no 103 shell oil 35.50 no 104 rent 565.00 no 500 car note 362.00 no 501 bellsouth 69.73 no multiple forms in the project allow user to admit check has cleared, change field to clear (from no to yes) review for quiz =============== forms: menus: timer control waits on a specified time interval to execute certain code. waits on the interval property. common dialog control - using it in the open mode for selecting a file. to display it, go with the showopen method. some of the properties: filename, cdlSelect.Filename, ...prebuilt form with all of that built in... can you write a filter? of course...[putting a filter in...] "Html tiles (*.html, *.htm)| *.html; *.htm | All Files (*.*)| *.* " pipes between everything. whole thing in quotes. cdlselectfile.filter="formfiles, et cetera..." be careful how you move from one form to the next. 3/26/99 ======= clipboard object... 'clipboard' Private Sub mnuCut_Click() Clipboard.SetText (get some string and copy it to clipboard) example: Clipboard.SetText txtedit.seltext ^^--- the actual editor part of the program this sets the highlighted text to the clipboard. to do a paste: Private Sub mnuPaste_Click() txtedit.Seltext=Clipboard.GetText End Sub be SURE that's seltext and NOT text! 3/31/99 ======= user validations on program 3 -- some input validations existance of files confirm overwrite of existing checks check number (legal values of 1-1000) payee (25 characters max) on the user defined type, we should actually use the "same type", so when dr. landry runs our program, the data types are the same. fields: checkno, payee, amount, cleared so - define a user-defined type type integer, string*25, single, boolean amount of the check and beginning balance - should be numbers greater than 0. confirm that the user wants to clear. each control has a "tool tip text" property...might want to give additional info there.. :) terminate event executes when you hit the X to exit a program. when your code does an END statement, it does not do a terminate event. on terminate event, you might want to do a " are you sure you want to quit? " file filter is nice, too. :) 4/5/99 ====== checks.txt will contain a lot of check #'s. it's not generated by the program. check for validity. clear batch will be checks.txt while not eof , read in checks.txt... 4/9/99 ===== Arrays - Hold a list of values of one data type under a single name. dim names (1 to 4) as string [could aslo be -5 to +10] (1 to 4 is the RANGE) let names(1) = "a1" dim name$, score% open "scores.txt" for input a #1 while not eof(1) input #1, name$, score% wend close #1 while not eof(1) let i% = 1%+1 input #1, name (1%), score (i&) combobox and listbox can sort? -- YES THEY CAN!! wow. :0 cbonames.sorted cbonames.itemdata () .listindex .newindex .listcount more examples: dim checkbook (1 to 1000) as checktype let checkbook(1).checknum = "1" let checkbook(1).payee = "Alabama Power" 4/12/99 ======= dynamic arrays in VB...... dim name$ (50) would go from 0-50. dim name$ (50) dim name$ (0 to 50) dim name$ (1 to 50) ^^^ - constant expression sample setup: dim maxlimit% let maxlimit% = 50 dim name$ (max limit) dynamic array: dim name$ () -- empty parenthesis. redim name$ (50) - name$ (maxlimit%) redim works ONLY with dynamic arrays. for a two deminsonal array, you might do something like: dim name$ (50,2) (0 to 50, 1 to 2) dim (0 to 200, 1 to 3) gives you 200 rows and 3 columns problems: checks.txt , a list of check numbers, such as : 1, 10, 501, 502, 660, 1000 print a report that lists each check no, payee, amount, and status (cleared?) order by payee. multi-deminsonal arrays aren't allowed and a user array is not... 4/14/99 ======= Control Arrays: same name (they use the same name) numbered sequentially triggered from the same event code they have an index property to identify individual numbers they have different properties sub txtField_Gotfocus(index as integer) let txtfield(index).selstart=0 let txtfield(index).sellength=len(txtfield(index)) end sub another example: sub cmdmain_click(index as integer) select case index case 0 me.enabled = false input.form.show case 1 end end select end sub Creating control arrays at design time: (must set at least one element) a) set the properties you wish to "duplicate" to whatever you wish b) copy and past an existing control (or rename another control) c) set index property to solve value d) at run time, you can create more elements with a "load" statement example: load txtfield(3) at run-time, new control array elements: -- are invisible (so set visible=true) -- must be positioned on form -- modify top = ; left = [top + 1.5 times the height or something...] use this do display additional checks... on actual program, add a function to sort a collection of check numbers. look into random access file, get information, sort by payee, print out information. (using labels or so..) when the user fills up the form...prompt...somehow if they've come OFF the form...overwrite the information coming onto the screen? [move the fields back up to the top?] 4/16/99 ======= When working with control arrays, the index basically should start at zero (since it will add them as you go starting from zero). you need to initially set the index at runtime? 4/19/99 ======= Visual Basic DEBUGGING: Logic Errors - problems with the program design. All those errors that do not fall into compile time or run time. It's not a "syntax" error. Generally gives you the wrong output. 4/23/99 ======= Three types of visual basic programming languages: VB - full featured visual basic language - has stand alone EXE files. VBA - subset of language. visual basic for applications. Used for writing macros in windows applications. VBSCRIPT - even a smaller subset of language scaled down IDE. designed for webpages. an alternative for javascript.