ugh....Richtextbox.text = OpenUpFile
Its quite basic.
=\ This is not the VB section.
Hey,
I want to make a button on this i press and then comes on a text field a code,
but this code is over a few lines ...
VB6 can only make one line -.-
How can i make it over a few lines ?
Thx
ugh....Richtextbox.text = OpenUpFile
Its quite basic.
=\ This is not the VB section.
There are two types of tragedies in life. One is not getting what you want, the other is getting it.
If you wake up at a different time in a different place, could you wake up as a different person?
bohnenbong (11-09-2007)
Sry,
But what must i write then ?
Richtextbox.text = OpenUpFile .... ?
Or with which must i change OpenUpFile ?
VB6.0
VB.netCode:open "C:\WhatEverTextFileYouWantToOpen.txt" for output #1 input #1, FilesData close #1 Richtextbox1.text = FilesData
Code:Include System.io=\ It was hard to write that code, I have gotten so used to adding ';' at the end of almost everything.Code:Dim OpenUpFile as new streamreader("C:\W\eFile You WannA Open.txt") Dim Tempstring as string = "" Tempstring = OpenUpFile.ReadToEnd()
Last edited by radnomguywfq3; 11-09-2007 at 09:24 AM.
There are two types of tragedies in life. One is not getting what you want, the other is getting it.
If you wake up at a different time in a different place, could you wake up as a different person?
bohnenbong (11-09-2007)
Does not work -.-
Here is an syntrax error!
open "C:\....\.....\Myfile.txt" for output #1
Or when it works comes this
Ok well now the code is...
Private Sub Command2_Click()
Open "C:\Dokumente und Einstellungen\******\Eigene Dateien\Module Gen\Module1.txt" For Output As 1
Input #1, DataFile
Close #1
Richtextbox1.Text = DataFile
End Sub
Last edited by bohnenbong; 11-09-2007 at 09:52 AM.
=\ My bad typo
Its Open "blublublu" for output as #1
C++ is making me forget VB =\
You should learn how to debug. Because when you get to C++ it gets alot fucking harder.
*edit*
Just install VB.net. Its my first language. Then its VB6.0, then C++. I can help you much better if your using VB.net
Last edited by radnomguywfq3; 11-09-2007 at 09:58 AM.
There are two types of tragedies in life. One is not getting what you want, the other is getting it.
If you wake up at a different time in a different place, could you wake up as a different person?
bohnenbong (11-09-2007)
Yes i fixed it bevore you write but ,
what is with the new error ?
Sry i go a little bit on your nerves :P
Try
open "blublublu" for input as #1
Input #1,FileData
close #1
and if that doesnn't work then try
open "blublublu" for output as #1
Input #1,FileData
close #1
You have to use the '#' sigh..
There are two types of tragedies in life. One is not getting what you want, the other is getting it.
If you wake up at a different time in a different place, could you wake up as a different person?
bohnenbong (11-09-2007)
Now this error :P
By Input for Output at the first line!
-_-. VB6.0 is old and out-dated. Half the error messages I don't understand. I highly suggest you move to VB.net, as a learner, attempting to learn VB, you should be learning with VB.net, not VB6.0.
There are two types of tragedies in life. One is not getting what you want, the other is getting it.
If you wake up at a different time in a different place, could you wake up as a different person?
bohnenbong (11-09-2007)
Ôk thx for spend time for this