/ Forside / Teknologi / Udvikling / VB/Basic / Nyhedsindlæg
Login
Glemt dit kodeord?
Brugernavn

Kodeord


Reklame
Top 10 brugere
VB/Basic
#NavnPoint
berpox 2425
pete 1435
CADmageren 1251
gibson 1230
Phylock 887
gandalf 836
AntonV 790
strarup 750
Benjamin... 700
10  tom.kise 610
loadfile problem
Fra : Lord Apophis


Dato : 29-11-00 01:43

Hi all can some assist me with a problem. I wish to display the contents of
a txt file in a text box

i have tried the following:

CommonDialog1.Filter = "c:\test.rtf"
CommonDialog1.ShowOpen
RichTextBox1.LoadFile CommonDialog1.filename, rtfRTF

(no luck with above, keeps highlighting the .loadfile bit on the last line.
got the source code from a friend who could not make it work either hence
why this one is an rtf and not txt)

text1.Loadfile ("c:\test.txt")

i am totally lost here

thanx ppls

Lord Apophis



 
 
Jan Damkjær Dahl (07-12-2000)
Kommentar
Fra : Jan Damkjær Dahl


Dato : 07-12-00 22:51

try this



"Lord Apophis" <me@home.com> skrev i en meddelelse
news:901jf9$p8u$3@bugstomper.ihug.com.au...
> Hi all can some assist me with a problem. I wish to display the contents
of
> a txt file in a text box
>
> i have tried the following:
>
> CommonDialog1.Filter = "c:\test.rtf"
> CommonDialog1.ShowOpen
> RichTextBox1.LoadFile CommonDialog1.filename, rtfRTF
>
> (no luck with above, keeps highlighting the .loadfile bit on the last
line.
> got the source code from a friend who could not make it work either hence
> why this one is an rtf and not txt)
>
> text1.Loadfile ("c:\test.txt")
>
> i am totally lost here
>
> thanx ppls
>
> Lord Apophis
>
>



Jan Damkjær Dahl (07-12-2000)
Kommentar
Fra : Jan Damkjær Dahl


Dato : 07-12-00 22:52

try this

CommonDialog1.ShowOpen
Open CommonDialog1.FileName For Input As #1
RichTextBox1.FileName = CommonDialog1.FileName
Close #1
frmprogram.Caption = CommonDialog1.FileName



"Lord Apophis" <me@home.com> skrev i en meddelelse
news:901jf9$p8u$3@bugstomper.ihug.com.au...
> Hi all can some assist me with a problem. I wish to display the contents
of
> a txt file in a text box
>
> i have tried the following:
>
> CommonDialog1.Filter = "c:\test.rtf"
> CommonDialog1.ShowOpen
> RichTextBox1.LoadFile CommonDialog1.filename, rtfRTF
>
> (no luck with above, keeps highlighting the .loadfile bit on the last
line.
> got the source code from a friend who could not make it work either hence
> why this one is an rtf and not txt)
>
> text1.Loadfile ("c:\test.txt")
>
> i am totally lost here
>
> thanx ppls
>
> Lord Apophis
>
>



Søg
Reklame
Statistik
Spørgsmål : 177558
Tips : 31968
Nyheder : 719565
Indlæg : 6408929
Brugere : 218888

Månedens bedste
Årets bedste
Sidste års bedste