So, I am new to vb and programming in general. I am taking a class that supposed to teach us about vb and gives us a lot of assignments but most of the people are giving up on the assignments because we cant figure out how to do them, even with the textbook. Out instructor doesn't reply to our questions either so our grades are dropping. I cannot afford to get a bad grade because I am using TA so I was wondering if I could get some quick fast help here. My assignment is due tomorrow. Here is the summary of the assignment:
"Write a Visual Basic program to create and maintain telephone directories. Each telephone directory should be contained in a separate text file. In addition, a file named Directories.txt should hold the names of the telephone directories. At any time, names of all the telephone directories should be displayed in a list box. After a telephone directory is selected, it becomes the current phone directory."
So i have a blank directories.txt file in the debug folder in solutions.
my current code is:
inputDirectories = InputBox("Please Enter the Name of the New Directory")
If inputDirectories Is "" Then
MessageBox.Show("Invalid Directory Name")
End If
Dim fileDirectories As IO.StreamWriter = IO.File.CreateText(" ")
fileDirectories.WriteLine(inputDirectories)
The thing is, I have no idea what I'm doing. I just know that I want whatever the user types in the input box is going to become a phone directory listed in the directories.txt and displayed in my lstBox. Also, for the lstbox/directories instructions "The Phone Directories listbox should immediately be refreshed to reflect the new directory, and the new directory should be automatically selected from the listbox. Note that this selection should trigger the procedure that sets the current directory and updates the contents of the current directory textbox. Also note that the list of directories is displayed in ascending order in the listbox."
If someone could give me step-by-step instructions or examples of code, I'd greatly appreciate it!
"Write a Visual Basic program to create and maintain telephone directories. Each telephone directory should be contained in a separate text file. In addition, a file named Directories.txt should hold the names of the telephone directories. At any time, names of all the telephone directories should be displayed in a list box. After a telephone directory is selected, it becomes the current phone directory."
So i have a blank directories.txt file in the debug folder in solutions.
my current code is:
inputDirectories = InputBox("Please Enter the Name of the New Directory")
If inputDirectories Is "" Then
MessageBox.Show("Invalid Directory Name")
End If
Dim fileDirectories As IO.StreamWriter = IO.File.CreateText(" ")
fileDirectories.WriteLine(inputDirectories)
The thing is, I have no idea what I'm doing. I just know that I want whatever the user types in the input box is going to become a phone directory listed in the directories.txt and displayed in my lstBox. Also, for the lstbox/directories instructions "The Phone Directories listbox should immediately be refreshed to reflect the new directory, and the new directory should be automatically selected from the listbox. Note that this selection should trigger the procedure that sets the current directory and updates the contents of the current directory textbox. Also note that the list of directories is displayed in ascending order in the listbox."
If someone could give me step-by-step instructions or examples of code, I'd greatly appreciate it!