|
Subject:
|
Data Save Suggestions....
|
|
Posted By:
|
JAtkinson
|
Post Date:
|
2/9/2004 12:16:58 PM
|
Hello everyone. I just started coding a few weeks ago with VB.NET. This is my first attempt at learning a programing language (dabbled with eMbedded VB 3.0 for PPC). I'm currently trying to write my first practical program. I bought the "Beginning VB.Net" book and it's been wonderful. I do have a question about my current project. Im making a sort of database for NFL Football players and their team and other information about them.
Project Outline: (Football Player Info) Form1 [Design]
-Scroll through ComboBox for Team -Enter Player Name in textbox -Enter Height in combobox -Other info in RichTextBox and so on...
My question is: I know how to save the RichTextBox text using streamwriter.How can I also save the information in the comboboxes and textboxes so when I open the application again, the information will be placed back into the textboxes and comboboxes. That way, in case some of their information changes, I can edit the player and re-save? Ive tried saving the combobox text also using the streamwriter, but when I open the file again, it puts the the combobox text in the RichTextBox and not into the combobox. I know this may sound confusing, but Im really new at programming. Any suggestions as to what I should do? XML?
Thanks, James Atkinson
|
|
Reply By:
|
JAtkinson
|
Reply Date:
|
2/9/2004 3:16:14 PM
|
OK, Ive tried working it into XML format. I just have one small problem. Instead of saving the file to Environment.CurrentDirectory, I would like to save it to a file path selected in a combobox.
Public ReadOnly Property DataFilename() As String
Get
' get our working folder...
Dim folder As String
folder = "c:\" & cmbNewTeam.Text "\" & cmbNewPosition.Text "\"
' return the folder with the name "Player Profile.xml"...
Return folder & "\Player Profile.xml"
End Get
End Property
If you take a look at the folder =, you can see what Im trying to do. I just need to correct format for doing this.
|