🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: pl.comp.lang.vbasic
Article #92446

Re: zapisanie mulitline textboxa do pliku

#92446
From: blizzard
Date: Fri, 28 Oct 2005 12:49
48 lines
2153 bytes
A ja bym zrobił funkcje wczytywania tak (u mnie przynajmniej dziala i nie
jestem pewien czy dokladnie o to Ci chodzi)

Dim Zdanie
Open "lol.txt" For Input As #2
Do Until EOF(2)
Line Input #2, Zdanie
Text1.Text = Text1.Text & Zdanie & vbCrLf
Loop
Close #2

wczytuje wszystkie linie pokolei dopolki sie plik nie skonczy. A do linni na
koncu dodaje enter. Jakos bardziej prosty sposob to dla mnie.
(text1.text powinien miec ustawiona funkcje "Multiline = True")


Marcin Miga wrote :

> Wczytuje ci bez enterów, bo czytasz linię po linii. Musiałbyś sobie po
> każdej linii dokleić enter (vbCRLF).
> Albo zrobić tak:
> zapis:
> Dim intFile&
> Const FILE As String = "d:\test.txt"
>
> intFile = FreeFile()
>
> Open FILE For Output As #intFile
> Print #intFile, Text1.Text
> Close #intFile
>
> odczyt:
> Dim intFile&
> Dim strFile$
> Const FILE As String = "d:\test.txt"
>
> intFile = FreeFile()
>
> Open FILE For Input As #intFile
> strFile = Input(LOF(intFile), #intFile)
> Close #intFile
> Text1.Text = strFile
>
> pozdrawiaMM
> -- 
> Marcin M. Miga
> "More matter with less art"
>
Technical Details
Message-ID: <djt6oj$g5n$1@atlantis.news.tpi.pl>
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!newsfeed.gazeta.pl!news.internetia.pl!newsfeed.tpinternet.pl!nemesis.news.tpi.pl!atlantis.news.tpi.pl!news.tpi.pl!not-for-mail
References: <djsoi7$hir$1@atlantis.news.tpi.pl> <C57BDD8470737A4D9F2CE5DEE25D7B9007E9B3B1@mailserver2.domdata.local>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!newsfeed.gazeta.pl!news.internetia.pl!newsfeed.tpinternet.pl!nemesis.news.tpi.pl!atlantis.news.tpi.pl!news.tpi.pl!not-for-mail
From: "blizzard" <blizzard@msi.pl>
Newsgroups: pl.comp.lang.vbasic
Subject: Re: zapisanie mulitline textboxa do pliku
Date: Fri, 28 Oct 2005 14:49:04 +0200
Organization: tp.internet - http://www.tpi.pl/
Lines: 50
Message-ID: <djt6oj$g5n$1@atlantis.news.tpi.pl>
References: <djsoi7$hir$1@atlantis.news.tpi.pl> <C57BDD8470737A4D9F2CE5DEE25D7B9007E9B3B1@mailserver2.domdata.local>
NNTP-Posting-Host: ajs2.internetdsl.tpnet.pl
X-Trace: atlantis.news.tpi.pl 1130503765 16567 83.16.252.2 (28 Oct 2005 12:49:25 GMT)
X-Complaints-To: usenet@tpi.pl
NNTP-Posting-Date: Fri, 28 Oct 2005 12:49:25 +0000 (UTC)
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1437
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1441
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit