Click here to Skip to main content
16,012,166 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
I am creating q program for my project using FRID reader and Tags. I am using Impinj R420 reader to read the tags. I can read the tags and display it in console only. I just want to display my Output in windows form using listbox or any form that it can use to display the tags information. Anyone can help me? Im just asking for some example on how display multiple outputs to a listbox from i/o streaming.

thank you.
Posted
Comments
SundararamanS 3-Aug-15 23:42pm    
Can you please post your code where you print it on your console...? Read from your stream & print on your console...

1 solution

C#
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace WindowsFormsApplication2
{
    public partial class Form3 : Form
    {
        public Form3()
        {
            InitializeComponent();
        }

        private void Form3_Load(object sender, EventArgs e)
        {
            string line;
            System.IO.StreamReader file = 
            new System.IO.StreamReader(@"C:\Project Files\MyTestFile.txt");
            while ((line = file.ReadLine()) != null)
            {
                listBox1.Items.Add(line);
            }

            file.Close();
        }
    }
}
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900