按钮的click事件 private sub button1_click(byval sender as system.object, byval e as system.eventargs) handles button1.click '打开目标文件(文件流) dim myfs as new filestream(application.startuppath & "/a.txt", filemode.open, fileaccess.read) '读文件 dim r as new streamreader(myfs) dim i as integer dim myline, tempstr as string '创建数组,接收文件数据 dim mylinestr(), a(100), b(100) as string dim c(100) as integer i = 0 myline = r.readline do while not (myline is nothing) mylinestr = myline.split(",") a(i) = mylinestr(0) b(i) = mylinestr(1) c(i) = mylinestr(2) i += 1 loop end sub