DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 2 of 2

Thread: I just want to add another question to my previous question

  1. #1
    Victoria Guest

    I just want to add another question to my previous question


    Hi!

    Also what if my textfile contains like say 10 lines:

    image1.bmp, some text
    image2.bmp, more text
    '
    '
    image10.bmp, nomore text

    If on my form I have say 10 PictureBoxes and 10 text boxes how can I tell
    vb that PictureBox 2 should show image2.bmp and PictureBox 10 should show
    image10.bmp?? How do you move through a text file and tell vb what to do
    with each line?

    Thanks,
    Vic

  2. #2
    marc Guest

    Re: I just want to add another question to my previous question


    use

    vb_index = 0

    while not eof(1)
    lineinput #1, ImagePath
    image(vb_index).picture = App.Path & "\" & left(ImagePath, instr(1,ImagePath,",")-1)
    text(vb_index).text = right(ImagePath, instr(1,ImagePath,",")+1)
    vb_index = vb_index + 1
    wend

    the image and text box controls are control arrays (vb_index) and the number
    of controls must equal or exceed the number of enteries in the text file.

    marc

    "Victoria" <miwok74@hotmail.com> wrote:
    >
    >Hi!
    >
    >Also what if my textfile contains like say 10 lines:
    >
    > image1.bmp, some text
    > image2.bmp, more text
    > '
    > '
    > image10.bmp, nomore text
    >
    >If on my form I have say 10 PictureBoxes and 10 text boxes how can I tell
    >vb that PictureBox 2 should show image2.bmp and PictureBox 10 should show
    >image10.bmp?? How do you move through a text file and tell vb what to do
    >with each line?
    >
    >Thanks,
    > Vic



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center