im looking at a more open approach to the application i made few days ago...
i would like to use a "template" text file that would be stored in the app path in a "templates" folder the user then picks what template they want and enters the few lines of text they need to change in textbox1 and texbox2 on the main form... please dont think i want someone to write my code for me i would just like to know how to go about it and if there is a tutorial online or that someone has i would like to read it as i always find i learn alot more by reading a tutorial then just a block of code... this is what i have so far..
Dim filename As String = "C:\Documents and Settings\TADS\Desktop\kev\tads.veh"
File.Open(filename, FileMode.Append)
File.ReadAllLines(filename)
File.ReadAllText(filename)
If filename.Contains("DefaultLivery=") Then
filename.Replace("DefaultLivery=", "DefaultLivery=" & Chr(34) & TextBox1.Text & Chr(34))
File.CreateText(filename)
End If
now i know i need to add something like...
File.WriteAllLines(filename, contents)
but somewhere along the lines i have lost myself and i havn't set the content (the string array to write the file) im not sure how to go from here..
or even if this is the correct way to do the job in question
thanks for reading
Kev

New Topic/Question
Reply




MultiQuote




|