1 / 8

Chapter 7 - Lists, loops and printing

Chapter 7 - Lists, loops and printing. List boxes and combo boxes several types can add items at design time or during run time user select from predefined list or add new entry simple combo boxes dropdown combo boxes dropdown lists automatic scrolling. No caption property

dillian
Download Presentation

Chapter 7 - Lists, loops and printing

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Chapter 7 - Lists, loops and printing • List boxes and combo boxes • several types • can add items at design time or during run time • user select from predefined list or add new entry • simple combo boxes • dropdown combo boxes • dropdown lists • automatic scrolling

  2. No caption property • prefixes: lst and cbo • filling the list - properties window if not change • Ctrl-Enter to add to list • AddItem method to add during run time • value and index • Clearing the list - clear method • ListIndex Property - select an item or determine which item selected when running - start with 0 • ListCount - number in list • ListProperty - holds all elements in list - referenced by index • ListCount - number in list

  3. Removing an item from the list - RemoveItem • Do/Loops • series of statements to be repeated • iteration - single execution • tested at the bottom or the top • pretest - at top • posttest - at bottom • Boolean - true or false • Using with list box

  4. For/Next Loops - repeats a specific number of times • loop index - controls - numeric • Step - incremented - default = 1 • Negative increment • Condition satisfied before loop entered • changing values in loop • endless loops • exiting

  5. MsgBox function - display dialog box • function returns value • specifiying buttons and/or icons to display • Using String functions • Left, right, mid to return part of a string • Len - count • SelStart and SelLength • Selecting entries in a list box - help user

  6. Sending to the printer • printer.print • formatting lines • commas - print zones - 14 spaces • semicolons - right after • blank lines • tab function - column position to start • spc function - number of spaces between • aligning string and numeric data • selecting the font - TrueType fonts • terminating page or job - NewPage

  7. Printing contents of list box • printing selected item from list • aligning decimal columns

  8. Assignment #13 • Pg. 319 – define key terms • - pg. 281 - prog. Exer. 7.2 • name everything appropriately • option buttons - one frame • drop down combo - subjects • list box – shelf number • Print – from form – can use picture box • OK – button - default • help, about - message box • loop to print subjects - 0 to (list count – 1) printer.print - Printer.EndDoc • to pick selected item from list - pg. 271 • hand in: printed output, code, form, form as text, design on paper

More Related