A. You are asked to create a form with a textbox namedtxtLocation a label named

A. You are asked to create a form with a textbox namedtxtLocation a label named lblGolfClub and a button namedbtnGetGolfClub. In the space below write the Visual Basic code tobe placed in the button-click event handler. Your code willretrieve the location on the golf course entered by the user. Ifthe location is the green the user will need the putter. If thelocation is the tee the user will need a wood. At any otherlocation the user will need an iron. After your code declaresvariables and retrieves the location value entered in the textboxby the user create a three-alternative selection statementthat sets a string named strGolfClub to putter if the location valueentered by the user is green; sets a string named strGolfClub to wood if the location valueentered by the user is tee; and sets a string named strGolfClub to iron if neither of theconditions above is true.The last step is to display the golf-club string in the label.

You can leave a response, or trackback from your own site.
error: Content is protected !!