VB6中的DoEvents [英] DoEvents in VB6

查看:303
本文介绍了VB6中的DoEvents的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的程序通过MSComm1将命令发送到相当慢的硬件.它使用Do循环中的DoEvents等待在Wait/Pause类型的子项中的答复,当MSComm1返回了预期数量的字符时退出.一切正常,但在Core2 Duo笔记本电脑上占用大约50%的CPU时间,在Celeron PC上占用98%的CPU时间.有更好的方法吗?

My program sends a command via MSComm1 to a fairly slow piece of hardware. It waits for a reply in a Wait/Pause type sub using DoEvents in a Do Loop, exiting when an expected number of characters have been returned by MSComm1. It all works fine but takes up about 50% of CPU time on a Core2 Duo laptop and 98% on a Celeron PC. Is there a better way?

推荐答案

将您的问题发布到VB6论坛中.您可以在下面找到链接:

对于Visual Basic 6问题,请阅读...


这是VB.NET(Windows窗体)论坛. :)

Post your question in the VB6 forum.  You can find the link below:

For Visual Basic 6 questions, please read...


This is the VB.NET (Windows Forms) forum.     :)


这篇关于VB6中的DoEvents的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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