Visual BASIC Programming

Fall 2005



  1. An email note about RecordSource property for Data1 at Design Time, so the lstCategory clicking works under all circumstances to choose between All Movies, Action/Adventure, Comedy and Drama.

  2. The Ghostbusters and Problem solving ideas, in more detail than the class handouts from Friday, 12/09. You might also wish to look at the Waggle Dancing Bees and problem solving/developing and choosing a PLAN of action material too. It is also more detailed and different than the two Animal Thinking and waggle dancing bees (direction, desirability and distance) handouts you received on the last day of class.

  3. Here is the FIXED UP movies97.mdb movies DATABASE, in case you want to download it. This is currently the ONLY link to the FIXED UP version. I will make all the other links point only to this copy ONLY AFTER I FIND OUT THIS ONE IS FINE. You do NOT have to try this one, but I hope some students do try it and let me know if it is fine.

    What was FIXED UP?

    1. Movies -> The Wedding Singer and Ever After had no Quotes in the Quotes table, and only entries in the Stars table.
    2. Movies -> Hair, Jurassic Park, and The Natural had famousLine entries in the Quotes table, but did not have any entry in the Stars table.
    3. This explains the 113 records in All Movies being changed to 100 records.
    4. There are now 119 records: 25 with Category Action/Adventure, 51 with Category Comedy, and 43 with Category Drama. There are No Quotes table movies without a corresponding Stars table entry, and vice versa.

  4. An Example program in an EXEcutable format, that you can download and execute, as long as you have a copy of movies97.mdb stored on your C: drive in a folder named Movies.

    See also NEW multiple CHOICE guessing game and helpful code and ideas. Includes and EXEcutable version to try out.

  5. Here is the Display of Movie Titles using a 2nd form, which has its own Data control to access the Stars table of the Movies database. The movie names are displayed in a ListBox control. This is from the Friday, December 2nd class. Set of study questions if provided, which will be helpful to look over on your own whether you add any of this functionality to your movie application or not.

  6. How easy is it to have BOOKMARKS and allow the user to switch CATEGORY of movie?

    It is this easy to CLEAR the OLD BOOKMARKS and prepare for the NEW recordset of movie quotes, i.e. prepare for a brand new Data1.Recordset with DIFFERENT BOOKMARKS for just the Comedies, or Dramas, or Action/Adventures, or for ALL of the Movies.

  7. PRELIMINARY outline of Requirements and Possible Directions (Options) for your Visual Basic database assignment. I will give out the final minimal requirements and options on Friday in class.

  8. Movies examples from past semesters databases exercises.

  9. TEST ONE WAS WORTH 31 + 15 = 46 points. Look up your total QUIZ and TEST gradebook scores here and also here are the additional scores, your rank and the total SUM, if you want to know relatively about where you stand going into the final. The programming assignment scores are NOT entered yet.

  10. Where is Visual Basic 6.0 in the Wright Hall 112 and 339 labs? It has MOVED to accomodate Visual Basic .NET.

  11. BEST FOR VISUAL BASIC 6.0 Working Model: Download the OLDER VERSION (ACCESS 97) Movie Quotes movies97.mdb database to start your assignment. Try this one ONLY if you have trouble with the other one, which could be the case if you have an OLDER textbook and Working Model version of Visual Basic 6.0. You will NOT be able to open this movies97.mdb up if you have Microsoft Access, but older versions of Visual Basic 6.0 will be fine with it.

  12. TO EXAMINE IF YOU HAVE access to Microsoft ACCESS: Download the Movie Quotes Movies2002.mdb database to start your assignment. Right mouse-click to get the POPUPMENU (context-sensitive menu) so you can download to your computer or diskette.

  13. Ghostbusters: First Database Example - November 16th, Wednesday. Movie guessing the "encrypted" film title, from seeing some quotes.

  14. Distribution of scores on Part One (Pages 1 and 2) of Test One, which you received back on Monday, November 14th. The scores ranges from 0 wrong to 16.5 wrong. The mean was 6.6 wrong, out of 31 possible.

  15. TEST ONE is on WEDNESDAY November 9th, and you received this helpful topic list and highlights note by email.

  16. Comparing Do While and For Next loops helps you to understand both better.

  17. Followup to Friday, November 4th Monte Carlo plotting of function f(x). Preview of Monday November 7th and Friday November 11th classes. You will have to know how to write user defined FUNCTIONs for the Wednesday exam.

    Followup to Friday, November 11th class: Entering functions from a Textbox control to an array. This is NOT something you need to worry about at all! However, you might be curious.

  18. Monte Carlo Assignment due on Monday 11/14/05.

  19. MONTE CARLO REVIEW exercise:

    1. What statement would you use to set the Form up to go from -2 to 2 for the X axis and -2 to 2 for the Y axis?

    2. What statements would you use to draw the X and Y axis on the Form?

    3. What statements would you use to draw a Line representing y = 1, and y = -1, and x = -1 and x = 1 on the Form, but to draw those FOUR lines so that they look something like this?

    4. Click on the graphic to see a plot of the function y = x squared + x - 0.8 and then see if you can plot that function after you have the rest done. The function is plotted in red.

  20. Test one (MIDTERM EXAM) on Wednesday, November 9th (instead of Friday the 4th). Here are old Exams for Practice. If you see material we have not yet covered, it is irrelevant for this test. It will probably be covered before the final exam, however.

  21. The Monte Carlo method for estimating the area between two functions.

  22. Menus and VB programs with more than one Form object. Included here is how to get the best screen snapshots of your menus in action. This program is due on Wednesday, November 2nd.

  23. Binary (base 2) numbers are essential for understanding the electronic digital computer. It only uses 2 digits, 0 and 1, for storing, representing and processing all data.

  24. Program on File Browser due on Friday, October 21st. Here are some Graphics Files.

  25. QUIZ THREE on Wednesday, October 19th.

  26. File Browser (GRAPHICS files) program code. And here is the GUI of the running program, which also shows you where the Graphics and Icons folders are on your computer, if you installed the Working Model of Visual Basic 6.0.

    For your viewing convenience, here are BOTH the VB code and the GUI, side by side.

    Extra resources on File Browser programs: Fall of 2002 examples and snapshots.

  27. Vertical Scroll Bar to control the SPEED of the Dancing U N I animation.

  28. Program for Dancing letters U N I and QUIZ TWO email note. The control array program with lblUNI(0), lblUNI(1), and lblUNI(2) can be started after the Friday, Sep 30th class presentation. The checkboxes techniques will be covered on Monday, October 3rd.

  29. QUIZ TWO WILL BE on WEDNESDAY next week (1st week in October) instead of this FRIDAY (last day in September).

  30. Review of Friday, September 23rd class, although the knuckles and 31 day months will not be in the review.

  31. Program Two RANDOM CIRCLES and the importance of having the COMMENTED OUT For Next loop, or you can remove those three lines of VB code. DUE in class OR BY 5 p.m. on Wednesday for PROGRAM TWO.

  32. QUIZ ONE and QUIZ TWO STUDY GUIDE and VIP INFORMATION/clarification. (Friday, Sep 16th note).
    Preview of For Next loops and the Mid("Panthers", 5, 3) function, if you want to look ahead or try out statements BEFORE we cover them.

  33. PROGRAM TWO - new due date: QUIZ ONE and PROGRAM TWO - Wednesday, September 21st.
    NOTE THE NEW DUE DATE FOR PROGRAM TWO.

  34. Email note on Assignment #2 and the September 14th, September 16th and September 19th classes.

  35. Assignment TWO: Hundreds of Randomly Sized, Randomly Located CIRCLES, at the Click of a cmdRandomCircles Command Button. .PSet method, Global variables, For Next loops, Timer controls with .Interval and .Enabled properties, and the windows Sleep function.

Assignment ONE: Initials Maker Application. The FIRST assignment was handed out in the LAST class in August, on Wednesday, 8/31.
Due on Friday, September 9th.
Due date: 09/09/05.


8/29/Monday note: EMAIL NOTE ONE, which you probably already received and read. (About assignment one, and about hands-on class on Friday, etc.)

Readings from the textbook for first half semester class meetings (up until exam #1).

  • Note: Your textbook cover probably looks different than this one! That is OKAY.
  • PowerPoint slides for lectures #1 and #2 and #3.
    This example program will be discussed and demonstrated and reviewed for at least FIVE lectures. Begin reading chapters 1 and 2 and 3 of the textbook. (Hours 1, 2 and 3).
  • Microsoft Excel VBA - VBA is a subset of VB and is used to help customize and automate applications like Access and PowerPoint and Excel. It is even used by non-Microsoft applications in many instances, because it is a powerful macro language that is well-known and supported.
    1. Excel Visual BASIC for Applications = VBA. Glance over the first 6 slides of this PowerPoint presentation to review the Friday, September 2nd intorduction to VBA macros class.
    2. We will EVENTUALLY do enough VBA macros that you are comfortable with that part of Visual Basic too.
    3. Macros can be RECORDED as well as WRITTEN. SOmetimes you record some portions and write the CODE for other portions of what you want.
    4. We will talk about this in class when we have time for a follow-up on Excel VBA. The Wednesday class, however, will be completely devoted to more Visual Basic 6.0 as it is needed and applies to your Initial Maker assignment.