Home All Groups Group Topic Archive Search About
Author
10 Oct 2006 1:54 PM
Binu C
hi am new to VB. I need to develop an application. The requirements are
as follows:

We have a notepad which consists of some data(Say A). Now we have a
form in which we have some text fields & a command button. when we
click cmd button once the data from the notepad should be read as
strings of different sizes & displayed in the text boxes. Again when we
click the cmd button the data in various text fields are written to
another notepad(say B) after creating it & again the remaining data is
read from the file A from the last position .

also i need a way to search for an unique string in notepad B from the
form  & edit details around that string in file B.

Pls help me.....i need this only in VB no other scripting as i don know
about scripting.

Also if anyone can tell me link where i can get details regarding file
handling in detail in VB..i will b very helpful..

Author
10 Oct 2006 2:10 PM
zacks
Binu C wrote:
Show quoteHide quote
> hi am new to VB. I need to develop an application. The requirements are
> as follows:
>
> We have a notepad which consists of some data(Say A). Now we have a
> form in which we have some text fields & a command button. when we
> click cmd button once the data from the notepad should be read as
> strings of different sizes & displayed in the text boxes. Again when we
> click the cmd button the data in various text fields are written to
> another notepad(say B) after creating it & again the remaining data is
> read from the file A from the last position .
>
> also i need a way to search for an unique string in notepad B from the
> form  & edit details around that string in file B.
>
> Pls help me.....i need this only in VB no other scripting as i don know
> about scripting.
>
> Also if anyone can tell me link where i can get details regarding file
> handling in detail in VB..i will b very helpful..

I would be surprised if anyone actually wrote some code for you. You
request is how to do very basic types of operations that even a
beginning program should either know or know how to figure out. I
strongly suggest spending a few days studing the help, go buy a book on
VB, and do a few Google searches for sample code.
Author
10 Oct 2006 3:43 PM
jonathandrott
everyone has to start somewhere!

something like this should help get you started:

'reading in the first file
Dim oFile As System.IO.File
            Dim oRead As System.IO.StreamReader
            Dim LineIn As String
oRead = oFile.OpenText(Me.txtbox.Text)  ' textbox where the file name
is
While oRead.Peek <> -1
'do what you want here
' i.e. stream writer
end while

za***@construction-imaging.com wrote:
Show quoteHide quote
> Binu C wrote:
> > hi am new to VB. I need to develop an application. The requirements are
> > as follows:
> >
> > We have a notepad which consists of some data(Say A). Now we have a
> > form in which we have some text fields & a command button. when we
> > click cmd button once the data from the notepad should be read as
> > strings of different sizes & displayed in the text boxes. Again when we
> > click the cmd button the data in various text fields are written to
> > another notepad(say B) after creating it & again the remaining data is
> > read from the file A from the last position .
> >
> > also i need a way to search for an unique string in notepad B from the
> > form  & edit details around that string in file B.
> >
> > Pls help me.....i need this only in VB no other scripting as i don know
> > about scripting.
> >
> > Also if anyone can tell me link where i can get details regarding file
> > handling in detail in VB..i will b very helpful..
>
> I would be surprised if anyone actually wrote some code for you. You
> request is how to do very basic types of operations that even a
> beginning program should either know or know how to figure out. I
> strongly suggest spending a few days studing the help, go buy a book on
> VB, and do a few Google searches for sample code.
Author
10 Oct 2006 5:29 PM
Chris Dunaway
jonathandr***@gmail.com wrote:
> 'reading in the first file
>  Dim oFile As System.IO.File
>             Dim oRead As System.IO.StreamReader
>             Dim LineIn As String
> oRead = oFile.OpenText(Me.txtbox.Text)  ' textbox where the file name
> is
> While oRead.Peek <> -1
> 'do what you want here
> ' i.e. stream writer
> end while
>

Creating an instance of the File object is not necessary as the
OpenText method is Shared.

Dim oRead As System.IO.StreamReader
Dim LineIn As String

oRead = File.OpenText(Me.txtbox.Text)