26. What does the following statement do? Explain carefully. PSet (100, 200), RGB(0, 0, 255) 27. Carefully describe what the very 1st thing is that the following Visual Basic statement does or causes the computer CPU to do or perform? (The statement consists of 5 different steps). - whichPt = Int(Rnd() * 3 + 1) 28. What is the 2nd action that occurs during the CPU's execution of the above Visual Basic statement? Describe it carefully and precisely. 29. What are the main two properties of a Timer control that a programmer needs to use the most often? 30. Write the event procedure for a Timer named Timer1 so that it changes the lblPanthers background color to a randomly chosen new color (one of 16 million colors) every 1/2 second. Write the entire event procedure, not just the statements that would go inside of it). 31. Write a command button event for the button called cmdPauseResume so that it would cause the Timer1 to stop if it was going and to start again (RESUME) if it was paused. The message on your command button should say Pause if the color changing is running and it should say Resume if it is currently paused. (This exercise relates to item 30, shown above here). 3. Name the two properties that have to be set in order that a ComboBox or a TextBox or a Label be a data aware object? (and display information from a database, such as the name of a movie, for example). 4. Your form must contain a different data control for every table in the database that you want to get field data from. T or F 5. What is the difference between a record and a field? 6. Name the three possible values that the RecordSetType property of the Data control can have. 7. What Data control property can take a SQL statement as its value at Design time or at Run time? 8. Suppose you have a menu that is named mnuChangeImage and you want it to be a context-sensitive menu and show up when the user right-clicks the mouse on the imgPhotoFrame image control. a. What event procedure needs to be programmed. What will it be named? b. Write the code that the event procedure will contain, so that the menu mnuChangeImage is displayed when the user of your program right-clicks on the imgPhotFrame image control. 9. Suppose the ListBox control is called lstMovieRentals. Give the Visual Basic statement to place the movie "Steel Magnolias" into the lstMovieRentals control. 1. The default Visual Basic ScaleMode is: 2. Write the statement to erase the drawing that has happened on Picture1 picture control: 3. Write the entire event procedure that would make the gif file JEWEL.GIF be displayed in the control imgMusicians. The Image control imgMusicians will display this when you click the command button cmdDisplayJewel. The path to get to the JEWEL.GIF file is A:\JEWEL.GIF, since we will assume it is on a diskette. 7. Use the _______________________ method of a recordset to rebuild the recordset when you want to change to a new set of records during runtime. 8. The RecordSource property of the Data control is used to specify the information to be used when creating the RecordSet object. What are the three types of information that can be used in the RecordSource property of the Data control? 9. What are the names of the two properties that you set for every bound control so that it automatically displays the desired information from a database your Visual Basic application and form is connected to? 10. Write the Visual Basic statement to cause a line to be drawn from the upper left-hand corner of the Form to the lower right-hand corner of the form. 11. What is wrong with the following Visual Basic procedure header line? Private Sub Form1_Load() 12. Write the statements to Graphically show the following function from x values 0.0 to 2.0 on your form. x y = --- + 0.2 ( y = 1/3 x + 0.2 ) is another way to express it. 3 --------------- Assume that the following x and y axis and scale for the form has been set up already during the Form_Load() event: Private Sub Form_Load() Form1.AutoRedraw = True Scale (-3, 3)-(3, -3) Line (-3, 0)-(3, 0) ' draw the x axis Line (0, 3)-(0, -3) ' draw the y axis End Sub Here is ONE possible correct ANSWER to the question: Private Sub cmdGraph_Click() Dim x As Single Line (0, 2)-(2, 2) <------ not needed, but nice Line (2, 0)-(2, 2) to have these For x = 0# To 2# Step 0.01 y = x / 3 + 0.2 PSet (x, y), vbBlue Next x End Sub