如何知道哪个事件从运行Visual Studio 2015的窗口开始触发 [英] How to know which event fires from start of windows form running visual studio 2015

查看:220
本文介绍了如何知道哪个事件从运行Visual Studio 2015的窗口开始触发的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

问题



如何知道哪些事件从Windows启动时开始运行,如load,然后是textchanged等... ..



我在表格加载时有一些变量。



这些变量都覆盖了它。



但是我不知道加载后哪个地方或事件发生火灾



这个窗体形式非常大编码行



以便实际需要什么



有没有办法或工具告诉我这些事件从程序开始到指定的进程触发。



这也不是正常事件,因为加载,文本更改这些自定义事件是由其他开发人员定制或完成的,我不知道任何关于源代码的事情。







因此我需要通过调试或跟踪或任何方式告诉我



这些事件会像textchange一样触发,因为更多的变量不显示在l上的实际值oad



我有更多的功能没有返回负载的实际值



所以我这样做显示事件更改或覆盖它。




我尝试过:



我尝试使用断点调试但我没有得到任何结果

Problem

How to know which events fires from start of windows form running like load then textchanged etc.... .

I have some variables on load of form .

these variables have override to it .

but i dont know on which place or event fires after load

this windows form is very big coding lines

so that what actually need

Are there are any ways or tools tell me the events fires from program start to specified Process .

Also this is not normal event as load ,text changed these custom events is customized or done by another developers and i dont know any thing about source code .



so that i need any way by debug or trace or any way tell me

these events fire as textchange,load because more variables not display with actual values on load

and i have more function not return actual values on load

so that what i do to display event changes or override it .


What I have tried:

I tried by using break point debug but i not get any result

推荐答案

Microsoft文档有一篇专门关于事件顺序的文章 - Windows窗体中的事件顺序Microsoft Docs [ ^ ]



OP评论后编辑



单程跟踪控件或对象中事件的顺序是记录它们 - 您需要使用IDE为每个可能暴露的事件生成代码存根并插入一些代码来写入日志事件的名称。这里有一个例子 - 事件生命周期 [ ^ ]
The Microsoft Documentation has an article specifically on the order of events - Order of Events in Windows Forms | Microsoft Docs[^]

EDIT after OP comment

One way to track the order of events in controls or objects is to log them - you will need to use the IDE to generate the code stub for every possible event that is exposed and insert some code to write to a log the name of the event. There is an example here - events lifecycle[^]


这篇关于如何知道哪个事件从运行Visual Studio 2015的窗口开始触发的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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