Question: Develop a Visual Basic project with the following features: 1 . The user interface can display the following information, one textbox for one item: 1
Develop a Visual Basic project with the following features:
The user interface can display the following information, one textbox for one item:
b Title
c Source where the paper is published
d Abstract
There is a command button "Import". It would allow the user to select the eric.txt as the input file and save the random file on the disk. With this function, you need to define a data structure for the record in the random file. Do some study to the data in eric.txt and design your own data structure. Save the random file in the same folder as where the exe file is and name the random file as randomefile.txt
When your program starts, it should detect whether databaswe.txt exist. If the file already exists, the Import button should be disabled, and your program should automatically open the random access file created in step
There is a Next button and a Previous button. When the first record is being displayed, the Previous button should be disabled. When the last record is displayed, the next button should be disabled.
Hint: title and abstract may take multiple lines in eric.txt
ADD ON TO THIS CODE
Public Class Form
Private Sub BtnreadClicksender As Object, e As EventArgs Handles Btnread.Click
Dim OpenFileDialog As New OpenFileDialog
OpenFileDialogShowDialog
Dim cat As eric
FileOpen OpenFileDialogFileName, OpenMode.Input
FileOpen "random.txt OpenMode.Random, RecordLength:Lencat
Dim oneline As String
Dim recno As Integer
recno
Do While Not EOF
oneline LineInput
If oneline.Length Then
If Midoneline "Authors: Then
cat.author oneline.Substring
End If
If Midoneline "Pub.Date: Then
oneline oneline.Substring
cat.year Valoneline
FilePut cat, recno
recno recno
End If
End If
Loop
FileClose
FileClose
End Sub
Private Sub FormDoubleClicksender As Object, e As EventArgs Handles MeDoubleClick
Dim cat As eric
FileOpen "random.txt OpenMode.Random, RecordLength:Lencat
FileGet cat,
txtauthor.Text cat.author
txtyear.Text Strcatyear
FileClose
End Sub
End Class
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
