点坐标的形式如下:
11.23 31.42
78.12 12.34
12.33 45.36
12.45 45.32
等等,行数很多,也就是数据量有点大,大约7000多行的数据
要求把这些点用c#窗体程序读入,但是在显示的时候不是以txt形式显示的,而是以这些数据坐标组成的点显示出来的.
要用窗体程序控件来写,哪位大侠能够给个具体的实例啊。

解决方案 »

  1.   

    streamreader逐行的获取,解析成数据,在窗体的OnPaint中绘制,实例的没有你去看看如何画图吧,搞清楚这个,你的问题不是问题
      

  2.   

    能不能给点具体的例子哦,我知道是用streamreader来读取,可是具体的东西能不能给展示一下,再截一个窗体图哦,谢啦
      

  3.   

    Bitmap bmp;        private void Form1_Load(object sender, EventArgs e)
            {            bmp = new Bitmap(this.ClientRectangle.Width, this.ClientRectangle.Height);            Graphics graphics = Graphics.FromImage(bmp);            int i, j;            int w = bmp.Width;            int h = bmp.Height;            int interval = 5;//             //每隔5个像素点画设置一个黑颜色点,生成图片。
    // 
    //             for (i = 0; i < w; i += interval)
    //             {
    //                 for (j = 0; j < h; j += interval)
    //                 {
    //                     //使用SetPixel()来设置像素点。
    //                     bmp.SetPixel(i, j, Color.Black);
    //                 }
                //             }
                bmp.SetPixel(33, 55, Color.Black);
                bmp.SetPixel(5, 3, Color.Black);
                bmp.SetPixel(44, 35, Color.Black);
            }        private void OnPaint(object sender, PaintEventArgs e)
            {
                Graphics graphics = e.Graphics;            //显示图片            graphics.DrawImage(bmp, new Rectangle(0, 0, this.ClientRectangle.Width, this.ClientRectangle.Height));
            }给分吧,亲
      

  4.   

    亲,你没把那个txt文件读进去啊,而且没有用已知的点显示出图成,能不能给点实质性的代码哦
      

  5.   

    你是不是一点C#也不会啊,读取txt直接搜啊,你每读取一行,就转换成点。然后放在这里面bmp.SetPixel(x, y, Color.Black);
    就行啦。