为什么WndProc(用于实现Restart Manager)在启动vb.net应用程序时反复运行? [英] Why WndProc ( used, to implement Restart Manager) runs repeatedly at starting of the vb.net application ?

查看:166
本文介绍了为什么WndProc(用于实现Restart Manager)在启动vb.net应用程序时反复运行?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我正在跟踪vb.net的性能问题 应用程序发现WndProc(用于实现Restart Manager)在vb.net应用程序启动时重复运行(32次!!!),即使msg<> 17 ?


请帮助我理解原因并解决问题。


您是否需要查看代码来帮助我?


希望尽快听取专家的意见,


提前致谢,及时回复。


Sabya

解决方案

可以覆盖应用程序中使用的任何控件的WndProc。现在,任何为此控件处理的窗口消息都将传递给重写方法。


在您的情况下,有32条消息被发送到控件,您已覆盖WndProc,因此这个 行为。


Hi,

I was tracking the performance issue of a vb.net  application and found that the WndProc ( used, to implement Restart Manager) runs repeatedly(32 times !!!) at starting of the vb.net application, even though the msg <> 17 ?

Please help me understand the reason and an work out.

Do you need to see the code to help me ?

Hope to hear the experts soon,

Thanks in advance for prompt responses.

Sabya

解决方案

WndProc can be overridden for any control used in your application. Now any windows message that gets processed for this control will be passed to the overridden method.

In your case there are 32 messages being sent to the control that you have overridden WndProc and so this behavior.


这篇关于为什么WndProc(用于实现Restart Manager)在启动vb.net应用程序时反复运行?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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