如何捕获打开文件的事件(只需使用鼠标双击即可)? [英] How to catch the event of opening a file (just normal double clicked using mouse)?

查看:148
本文介绍了如何捕获打开文件的事件(只需使用鼠标双击即可)?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,我想编写一个程序,当我打开.txt文件时,该程序可使光标停留在文本的后面.但是我无法赶上打开文件的事件.
据说我可以观看打开文件表",以便也许可以找出刚刚打开的文件,但找不到该表的访问权限...:sigh:
请帮我.请给我一种捕捉此类事件并获取其名称的方法.最好让我知道如何移动光标(使用API​​或其他方法),这样我可以节省大量的搜索时间.

Hi, I wanna write a program which can make my cursor at the rear of the text when I open a .txt file. But I cannot make it to catch the event of opening a file.
It is said that I can watch the Open File Table so that I might be able to find out which file is just opened, but I can''t find the access to the table... :sigh:
Please help me. Just give me a way to catch such an event and get its name. It would be better if you''d let me know how to move the cursor(using API or something else) so that I can save a lot of time of searching for that.

推荐答案

拧碎所有事件"废话,并编写自己的日志查看器,该日志查看器本身会滚动到日志底部.这非常容易做到.

事件仅存在于使用事件的应用程序内部.您无法订阅来自Explorer的Double-Click事件,该事件不会让您知道被双击的事件.

至于OpenFileTable ...我完全没有示例,也没有详细信息.
Screw all the "event" crap and write your own log viewer that scrolls to the bottom of the log by itself. This is extremely easy to do.

Events only exist inside the application that is using them. There is no Double-Click event that you can subscribe to that comes from Explorer and lets you know what was double-clicked.

As for the OpenFileTable...I don''t have an example at all and I don''t have the details.


打开文件"或读取文件".

OpenFileTable也不会帮助您,因为您不知道哪个应用程序打开了文件,出于什么原因,即使文件被显示,...

不知道为什么要这样做以及您要支持哪个应用程序,就不可能提出解决方案.
There is no such event for "open file" or "read file".

The OpenFileTable won''t help you either because you have no idea which app opened the file, for what reason, if it''s even being displayed, ...

Without knowing why you want to do this and for which app you''re supporting, it''s impossible to come up with a solution.


这篇关于如何捕获打开文件的事件(只需使用鼠标双击即可)?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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