VB6表单在读取长文本文件时没有响应 [英] VB6 form not responding while reading long text file

查看:59
本文介绍了VB6表单在读取长文本文件时没有响应的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我目前正在vb6中创建一个程序,它从文本文件中读取数千行。所以我用循环来读取每一行。它运行良好,但问题发生在我运行程序并尝试最小化窗体或尝试使用另一个应用程序。似乎表单失去了焦点并且没有响应,尽管它仍处于处理循环的状态。

I am currently creating a program in vb6 that reads thousands of lines from a text file. So I use loop to read each line. It works perfectly but the problem occur when I run the program and try to minimize the form or try to use another application. Seems that the form lost it focus and isnt responding though it is still in the state of processing the loop.

推荐答案

为什么你不读完整个文件一次然后逐行处理数据。
why don''t you read the entire file at once and then process the data line by line .



为什么你不能一次读取整个文件然后处理数据逐行 。
why don''t you read the entire file at once and then process the data line by line .



tnx回复......难道不一样吗?我的意思是,如果我读完整个文件应该在哪里存储?以及我将如何逐行检索它?我仍然会使用循环权限吗?...对不起我是视觉基础的新手..

tnx for replying... Is''nt it the same? I mean, If I read the entire file where should I store it?? and how I will retrieve it line by line? I will still use loop right??... sorry Im new to visual basic..


但肯定会减少光盘I / O.
but that certainly involvs less disc I/O.


这篇关于VB6表单在读取长文本文件时没有响应的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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