Click here to Skip to main content
15,905,607 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
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.
Posted

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.
 
Share this answer
 
Comments
MITER_J 17-Nov-10 20:38pm    
My own log viewer... That's good. I didn't come out with such a solution. Thank you.
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.
 
Share this answer
 
Comments
MITER_J 17-Nov-10 11:03am    
My purpose of this idea is very simple. I just got tired of moving down and down to the rear of the .txt file to add something, so I just wanna make this movement automaticlly done. Then what about double-click event? I think there'e surely a way to accomplish this... Btw, even it might be no use for me right now, could you please do me a favor of telling me in detail how to access the OpenFileTable? That might be useful for me later. Thx.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900