Outputting standard text
Outputting standard text
Outputting standard text
Outputting standard text
Outputting standard text
Outputting standard text Outputting standard text Outputting standard text Outputting standard text Outputting standard text Outputting standard text Outputting standard text Outputting standard text
Outputting standard text Outputting standard text
Outputting standard text
Go Back  Xtreme Visual Basic Talk > > > Outputting standard text


Reply
 
Thread Tools Display Modes
  #1  
Old 10-27-2004, 12:57 PM
AdrianPyro AdrianPyro is offline
Freshman
 
Join Date: Apr 2004
Posts: 26
Default Outputting standard text


How to I output text as readable text in notepad
i'm using this type of output

Open "c:\currentList.txt" For Random As #1 Len = 1000
put #1, variable1
close #1

but this outputs as... machine language..?
Reply With Quote
  #2  
Old 10-27-2004, 08:36 PM
JustAdotNETUser JustAdotNETUser is offline
Freshman
 
Join Date: Oct 2004
Posts: 42
Default

Quote:
Originally Posted by AdrianPyro
How to I output text as readable text in notepad
i'm using this type of output

Open "c:\currentList.txt" For Random As #1 Len = 1000
put #1, variable1
close #1

but this outputs as... machine language..?

Your code is VB6 code, not vb.net, you need to use StreamReader & StreamWriter.

Quick example of writing a line of text:

Code:
    Dim swFile As StreamWriter = File.CreateText(Application.StartupPath & "\Text.txt")
    swFile.WriteLine("============== HELLO ================")
    swFile.Flush()
    swFile.Close()
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Advertisement:





Free Publications
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET.
subscribe
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
subscribe
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
This comprehensive step-by-step guide will help get your database-driven ASP.NET web site up and running in no time..
subscribe
Outputting standard text
Outputting standard text
Outputting standard text Outputting standard text
Outputting standard text
Outputting standard text
Outputting standard text Outputting standard text Outputting standard text Outputting standard text Outputting standard text Outputting standard text Outputting standard text
Outputting standard text
Outputting standard text
 
Outputting standard text
Outputting standard text
 
-->