Results 1 to 2 of 2

Thread: Help please

Threaded View

  1. #1

    Thread Starter
    New Member
    Join Date
    Apr 2011
    Posts
    2

    Help please

    Add code to display the right picture when the user guesses wrong. The pictures are in the Images folder in your starter project. Copy the Images folder to the \bin\Debug directory of your project folder.
    2. Look inside the Images folder. How will the naming convention for the graphics help you write code to display the right graphic?
    3. Change the graphic in two places in the code. How can you reduce your coding and testing effort?
    4. Add the following subprocedure to your application:
    Private Sub ShowPicture()
    Dim strImagePath As String
    strImagePath = _ Application.StartupPath & _
    "\images\fig" & intNumWrongTries _
    + 1 & ".gif"
    picBody.ImageLocation = _ strImagePath
    picBody.Load()
    End Sub

    HINT: You can avoid typographic errors by copying this code sample.
    5. Call the ShowPicture subprocedure right after incrementing intNumWrongTries in both GuessLetter and btnGuessW_Click procedures.
    6. Test your code to verify that the picture displays correctly.
    7. If you save the answers in a separate file, explain what type of file would be the easiest to use, assuming the file will be treated as read-only by the application.
    8. Explain how saving the answers in a separate text file instead of in the program will make it easier to customize the words used as answers.
    9. Specify what the code in the ShowPicture() procedure does. Use the Word Draw tools to add a flowchart to the end of your answer document.
    10. Open the file btnGuessL_Click.doc in the project start folder. Compare the flowchart to the finished code in the btnGuessL_Click procedure. Make sure you can identify where each part of the flowchart is implemented in your code.

    I am so lost on how to do a showpicture thing idk what to do please help
    Attached Files Attached Files

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width