在Windows窗体上显示数据 [英] Displaying data on windows form

查看:59
本文介绍了在Windows窗体上显示数据的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想创建一个简单的winform应用程序,显示存储为.txt的数据(或者甚至可以作为数据库显示为图形)..

我想制作一个C#winform应用程序为此而且几乎没有先前的开发经验...

如何做到这一点.. ???

I want to make a simple winform application that displays data stored as .txt (or maybe even as a database and display it as a graph)..
I want to make a C# winform application for this and have little prior development experience...
How can this be done.. ???

推荐答案

使用流阅读器class在formload中使用



use the stream reader class use this in formload

try
            {
                StreamReader sr = new StreamReader(@"C:\Users\Vishnu\Desktop\hind.txt");

                    String txtread;
                    while ((txtread = sr.ReadToEnd()) != null)
                    {


                TextBox1.Text=txtread

                       
                    }
            }
            catch (Exception e)
            {
                

            }


这篇关于在Windows窗体上显示数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆