VB.Net当双击打开自定义文件时触发什么事件? [英] VB.Net What Event is Triggered When Double-Clicking to Open Custom File?

查看:266
本文介绍了VB.Net当双击打开自定义文件时触发什么事件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我创建了一个由我的应用程序识别的自定义文件类型,我想知道当我通过双击这种类型的文件打开我的应用程序时会触发什么事件。我已经在Form.Shown和Form.Load的处理程序的开始,以及在窗体的构造函数的开始部分放置了断点,但应用程序从不碰到断点。

调试程序附加到正在运行的进程,但是您我们谈论的事情发生得相当迅速,所以你几乎肯定不能够快速地附加到这个过程来设置你的断点,并在执行过程中捕获它们。



最终,通过文件关联打开应用程序时触发的事件与通过运行其可执行文件打开应用程序没有什么不同。

I have created a custom file type that is recognized by my application, and I would like to know what event is triggered when I open my application by double-clicking a file of this type. I have placed breakpoints at the beginning of handlers for Form.Shown and Form.Load, as well as at the beginning of the form's constructor, but the application never hits the breakpoints.

解决方案

If you're opening the application by double-clicking on the file in your computer's filesystem the debugger built in to Visual Studio won't be attached to the application's process and so won't break at your breakpoints. You can attach the debugger to a running process, but what you're talking about happens fairly quickly, so you will almost certainly not be able to attach to the process fast enough to set your breakpoints and catch the execution as it passes them.

Ultimately, the events triggered when you open your application via a file association is no different to opening the application by running its executable file.

这篇关于VB.Net当双击打开自定义文件时触发什么事件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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