Date: Wed, 28 Jun 2000 15:30:14 -0500 (CDT) Hi Visual Basic students, You can turn in your Pseudocode and Flowchart and chapter 3 textbook 9 questions on Thursday during class or wait until Friday at the quiz. We will do a few more pseudocode and flowchart things in the lab session on Thursday. Dancing U N I is due on Thursday. We will try to have a hands-on class on Thursday, if I can get the cart and projector back. I will go over what will be on the quiz on Friday during the Thursday class, perhaps with a handout and the summary of that will be available from the web page and/or email too. For sure, you should be studying the lecture notes and handouts from the class, as well as the readings from the book. The Timer control would be great on the 2nd quiz, as everyone will have experience with that at this point. The RGB function for generating a color should be understood very well at this point in the class. How to use the Rnd function to get whatever random numbers you want should be well understood. The names of the main properties we have used for Labels, Command button, Image and PictureBox controls, TextBox controls, Timers, vertical scroll bars, would be important. The LoadPicture() function that can be used for Image and PictureBox controls is vip. Here are a couple of sample questions: 1. The user is to see a message box that displays the message HELLO WORLD! when they click anywhere on the Image1 imgSeeMessageBox control. Write the code so they see the message box (with the standard OK button) after they click on Image control imgSeeMessageBox. 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. 4. Carefully describe what the very 1st thing is that thefollowing Visual Basic statement does or causes the computer CPU to do or perform? (The statement consists of 5 different steps or operations). whichPt = Int(Rnd() * 3 + 1) Can you write the above statement as 5 separate statements? It really does consist of FIVE different operations by the computer. You would need to use extra variables to show it as 5 separate statements on 5 lines. 5. What is the 2nd action that occurs during the CPU's execution of the above Visual Basic statement? Describe it carefully and precisely. 6. What are the main two properties of a Timer control that a programmer needs to use the most often? (Answer with the NAME of each property). 30. Write the event procedure for a Timer named Timer1 so that it changes the lblPanthers background color to a randomly chosen color (one of 16 million) 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). 81. Write the Visual Basic statement that would change the color of the letters (not the background color) and characters displayed in the Label control named lblQuestion81 to the brightest RED possible. Use the function we have used in class and examples over and over and over again to do this. Do NOT use any constants (there is one called vbRed). 82. Know the idea of STATIC variables. 83. Know how to do a FOR NEXT loop to print the numbers 1 through 10 on a FORM or on a PICTUREBOX control. 84. Be able to recognize the different FLOWCHART symbols. That is ENOUGH sample quiz questions for your study guide.