here is my code so far:
' Name: Glovers Project
' Purpose: Displays the price of an item
' Programmer: <Paul J. Williams> on <February 27, 2010>
Option Explicit On
Option Strict On
Option Infer Off
Public Class frmMain
Structure Product
Public strItem As String
Public dblPrice As Double
End Structure
' Declare a 5 element module level array for the Product Structure
Private ProductList(4) As Product
Dim strSearchForID As String
Dim intSubscript As Integer
Private Sub btnExit_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnExit.Click
Me.Close()
End Sub
Private Sub lstNumbers_Enter(ByVal sender As Object, ByVal e As System.EventArgs) Handles lstNumbers.Enter
End Sub
Private Sub lblPrice_Enter(ByVal sender As Object, ByVal e As System.EventArgs) Handles lblPrice.Enter
End Sub
Private Sub frmMain_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
Dim inFile As IO.StreamReader
Dim strLine As String
' Determine if the file exist
If IO.File.Exists("ItemInfo.txt") Then
inFile = IO.File.OpenText("ItemInfo.txt")
' Process the look until the end of the file
Do Until inFile.Peek = -1
' Read a line
strLine = inFile.ReadLine
' Populate the list box
lstNumbers.Items.Add(strLine)
Loop
' Close the file
inFile.Close()
Else
MessageBox.Show("Can not locate the ItemInfo.txt file", "Glovers Industries", _
MessageBoxButtons.OK, MessageBoxIcon.Information)
End If
End Sub
End Class

New Topic/Question
Reply




MultiQuote




|