Click here to Skip to main content
15,924,581 members
Home / Discussions / Visual Basic
   

Visual Basic

 
AnswerRe: DateTimePicker DropDown? Pin
sagmam23-Jul-04 6:58
sagmam23-Jul-04 6:58 
AnswerRe: DateTimePicker DropDown? Pin
Anonymous23-Jul-04 8:48
Anonymous23-Jul-04 8:48 
General"Specified Cast Not Valid" Pin
nvmoss5-Apr-04 5:41
nvmoss5-Apr-04 5:41 
QuestionHow to programatically create a text file containing the VB.Net code neccessary for recreating a different file programatically Pin
Codemonkey855-Apr-04 5:06
Codemonkey855-Apr-04 5:06 
AnswerRe: How to programatically create a text file containing the VB.Net code neccessary for recreating a different file programatically Pin
Nadroj5-Apr-04 7:23
Nadroj5-Apr-04 7:23 
GeneralRe: How to programatically create a text file containing the VB.Net code neccessary for recreating a different file programatically Pin
Codemonkey855-Apr-04 17:19
Codemonkey855-Apr-04 17:19 
GeneralRe: How to programatically create a text file containing the VB.Net code neccessary for recreating a different file programatically Pin
Nadroj5-Apr-04 18:52
Nadroj5-Apr-04 18:52 
GeneralRe: How to programatically create a text file containing the VB.Net code neccessary for recreating a different file programatically Pin
Codemonkey855-Apr-04 19:56
Codemonkey855-Apr-04 19:56 
Err, not quite. First of all, I don't want to have to hardcode the source into the program, or else 1) what would be the point in selecting the source file, and 2) it would have to be modified and recompiled each time I wanted to copy a file.

I want a sub that would take your example HTML file, and create a text file containing this:

Private Sub MakeFile()
Dim inFile As StreamReader = File.OpenText(Application.StartupPath & "\myHomePage.html")
Dim outFile As StreamWriter = File.CreateText(Application.StartupPath & "\myDoc.txt")

outFile.Writeline("<html>")
outFile.Writeline("<title>Heres my title</title>")
outFile.Writeline("<body>")
outFile.Writeline("<p>here is all my text for the web page.</p>")
outFile.Writeline("</body>")
outFile.Writeline("</html>")

outFile.Close()
inFile.Close()

End Sub

This would be a text file containing the VB.Net code required to remake the source file, which is what I want the original sub to make. In other words, if I were to run this code on a program (that is to say, the code in the new text file), it would create the myHomePage.html file in the bin folder.

As I sit here, I contemplate the last words of Socrates: "I drank what?".
GeneralRe: How to programatically create a text file containing the VB.Net code neccessary for recreating a different file programatically Pin
Nadroj5-Apr-04 20:08
Nadroj5-Apr-04 20:08 
GeneralRe: How to programatically create a text file containing the VB.Net code neccessary for recreating a different file programatically Pin
Nadroj5-Apr-04 20:15
Nadroj5-Apr-04 20:15 
GeneralRe: How to programatically create a text file containing the VB.Net code neccessary for recreating a different file programatically Pin
Codemonkey855-Apr-04 21:52
Codemonkey855-Apr-04 21:52 
GeneralRe: How to programatically create a text file containing the VB.Net code neccessary for recreating a different file programatically Pin
Nadroj6-Apr-04 3:01
Nadroj6-Apr-04 3:01 
AnswerRe: How to programatically create a text file containing the VB.Net code neccessary for recreating a different file programatically Pin
Dave Kreskowiak6-Apr-04 0:56
mveDave Kreskowiak6-Apr-04 0:56 
GeneralRe: How to programatically create a text file containing the VB.Net code neccessary for recreating a different file programatically Pin
Codemonkey856-Apr-04 11:50
Codemonkey856-Apr-04 11:50 
GeneralRe: How to programatically create a text file containing the VB.Net code neccessary for recreating a different file programatically Pin
Nadroj6-Apr-04 11:52
Nadroj6-Apr-04 11:52 
GeneralRe: How to programatically create a text file containing the VB.Net code neccessary for recreating a different file programatically Pin
Codemonkey856-Apr-04 16:38
Codemonkey856-Apr-04 16:38 
GeneralSerializing Pin
Anonymous5-Apr-04 4:51
Anonymous5-Apr-04 4:51 
GeneralRe: Serializing Pin
Alberto Venditti5-Apr-04 21:12
Alberto Venditti5-Apr-04 21:12 
GeneralRe: Serializing Pin
Randy S6-Apr-04 15:01
Randy S6-Apr-04 15:01 
GeneralApplication with Socket Programming Pin
rajamca20034-Apr-04 20:39
rajamca20034-Apr-04 20:39 
GeneralRe: Application with Socket Programming Pin
adarsh_m4-Apr-04 23:44
adarsh_m4-Apr-04 23:44 
GeneralClickety Pin
Colin Angus Mackay5-Apr-04 0:22
Colin Angus Mackay5-Apr-04 0:22 
GeneralCopying a class (copy constructor) Pin
PaleyX4-Apr-04 12:29
PaleyX4-Apr-04 12:29 
GeneralRe: Copying a class (copy constructor) Pin
Dave Kreskowiak4-Apr-04 17:47
mveDave Kreskowiak4-Apr-04 17:47 
GeneralDependency problems in deploying a VB.Net Application Pin
nvmoss4-Apr-04 9:01
nvmoss4-Apr-04 9:01 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.