2
Anh Nguyen, Huy Dinh 11/29/2014 12:00 PM to 2:00PM GAME PRICE APP Create an app for customer who wants to add video game and find the number of specific game with specific price.

Game Price App

Embed Size (px)

DESCRIPTION

gm

Citation preview

Anh Nguyen, Huy Dinh11/29/201412:00 PM to 2:00PM

GAME PRICE APPCreate an app for customer who wants to add video game and find the number of specific game with specific price.

PROGRAM LISTING:Private Sub btnAddgame_Click(sender As Object, e As EventArgs) Handles btnAddgame.Click 'Ask how many game in your store Dim intHowmany As Integer Dim rand As New Random

Try intHowmany = CInt(InputBox(" How many game you like to add?")) If intHowmany = Nothing Then lblStatus.Text = " Data is not found" End If Catch Ex As Exception lblStatus.Text = " Data is not found" End Try ' process For counter = 0 To intHowmany - 1 Step 1 GameList.Items.Add(rand.Next(0, 101)) 'output Next lblStatus.Text = intHowmany & " Random Games created" lblStatus.ForeColor = Color.ForestGreen

End Sub

Private Sub btnClear_Click(sender As Object, e As EventArgs) Handles btnClear.Click Dim intfind As Integer Dim strGame As String Dim strPrice As String

intfind = CInt(InputBox(" How many game you want to find")) ' process For counter = 0 To intfind - 1 strGame = InputBox("Enter the game name" & counter + 1) strPrice = InputBox(" Enter the price of " & strGame)

Next GameList2.Items.Add(strGame) Gamelist3.Items.Add(strPrice) End Sub