Feeding my form with a list of words
Feeding my form with a list of words
Feeding my form with a list of words
Feeding my form with a list of words
Feeding my form with a list of words
Feeding my form with a list of words Feeding my form with a list of words Feeding my form with a list of words Feeding my form with a list of words Feeding my form with a list of words Feeding my form with a list of words Feeding my form with a list of words Feeding my form with a list of words
Feeding my form with a list of words Feeding my form with a list of words
Feeding my form with a list of words
Go Back  Xtreme Visual Basic Talk > > > Feeding my form with a list of words


Reply
 
Thread Tools Display Modes
  #1  
Old 10-10-2010, 01:20 AM
jkost jkost is offline
Newcomer
 
Join Date: Oct 2010
Posts: 1
Default Feeding my form with a list of words


Hello!

i have the following code which takes input from a text box and then writes
everything to a file...

Code:
Dim FILE_NAME As String = Environment.GetFolderPath(Environment.SpecialFolder.Desktop) & "\text.txt"
        Dim i As Integer
        Dim MyText(4) As String

        MyText(0) = "my text #0"
        MyText(1) = "my text #1"
        MyText(2) = "my text #2"
        MyText(3) = "my text #3"
        MyText(4) = "my text #4"

        If System.IO.File.Exists(FILE_NAME) = True Then

            Dim objWriter As New System.IO.StreamWriter(FILE_NAME)

            For i = 0 To 4
                objWriter.WriteLine(MyText(i))
            Next


            objWriter.Write("Text in the same line #1")
            objWriter.Write(TextBox1.Text)
            objWriter.Write("Text in the same line #2")

            objWriter.Close()


        End If
        Process.Start(FILE_NAME)
because it's not convenient for me to copy/paste one by one the words in the text box... what i thought i could do is to find a way to feed a list of the words and then choose with the arrow keys which word it should be written to the specific file.

can somebody help? thank you!
Reply With Quote
  #2  
Old 12-03-2010, 10:30 AM
wildfire1982 wildfire1982 is offline
Senior Contributor
 
Join Date: Jul 2003
Location: Southampton UK
Posts: 801
Default

Do you mean that you want to feed data into the form from another file or something? Ideally, where would you like the data to come from? A file? the clipboard as lots of segments of data?

If you are just asking how to select different bits of data which is commonly used, you could use a listbox or grid or something like that. Is this what you mean?
__________________
Chris
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
Feeding my form with a list of words
Feeding my form with a list of words
Feeding my form with a list of words Feeding my form with a list of words
Feeding my form with a list of words
Feeding my form with a list of words
Feeding my form with a list of words Feeding my form with a list of words Feeding my form with a list of words Feeding my form with a list of words Feeding my form with a list of words Feeding my form with a list of words Feeding my form with a list of words
Feeding my form with a list of words
Feeding my form with a list of words
 
Feeding my form with a list of words
Feeding my form with a list of words
 
-->