“DoEvents"是什么?在vb6中做? [英] What does "DoEvents" do in vb6?
问题描述
DoEvents"在 vb6 中有什么作用?为什么我会收到错误消息堆栈空间不足"?什么意思?
What does "DoEvents" do in vb6 ? Why do I get the error message "Out of stack space" ? What does it mean ?
推荐答案
DoEvents() 允许处理其他 Windows 消息.
DoEvents() allows other Windows messages to be processed.
您收到堆栈空间不足错误的原因可能是因为 DoEvents() 允许再次调用您的代码的事件发生,该事件再次调用 DoEvents(),依此类推,直到堆栈空间,它跟踪返回地址对于所有这些调用,已用完.
The reason you get an out of stack space error is probably because DoEvents() is allowing events to occur that call your code again, which again calls DoEvents(), and so on until the stack space, which tracks the return addresses for all these calls, has run out.
总的来说,我不建议使用 DoEvents(),因为有这些问题,而且它违反了 Windows 的整体事件驱动设计.
In general, I do not recommend using DoEvents() due to problems like these and the fact that it violates the overall event-driven design of Windows.
这篇关于“DoEvents"是什么?在vb6中做?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!